[CLOSED] windows position of big windows

  1. #1

    [CLOSED] windows position of big windows

    Hello, is there a way how to display window from the top of the page?

    probably best if you check this example

    <%@ Page Language="C#" %>
    
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
        <title>Show/hide components according to value - Ext.NET Examples</title>
    </head>
    <body>
      
        <form runat="server">
            <ext:ResourceManager runat="server" />
    
            <h1>Window test</h1>
    
    		<ext:Window runat="server" Scrollable="Both" MaxHeight="2000" Width="500">
    			<Items>
    				<ext:DisplayField runat="server" Text="Hidden text"></ext:DisplayField>
    				<ext:Panel runat="server" Height="3000">
    
    				</ext:Panel>
    			</Items>
    		</ext:Window>
        </form>
    </body>
    </html>
    top part of the window is hidden (which I'm finw with) but thereis no way how the user can get to it (any kind of scrolling)

    ideaaly if window title is rendered at the top edge of the browser, so everything would be visible

    (I know that I can set height of the window according available space as a workaround)

    Thanks
    Last edited by fabricio.murta; Jan 05, 2021 at 6:54 AM.
  2. #2
    Hello @ibrohan!

    Here you go:

    <%@ Page Language="C#" %>
    
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
        <title>Show/hide components according to value - Ext.NET Examples</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
    
            <ext:Viewport runat="server" Scrollable="Both">
                <Items>
                    <ext:Label runat="server" Html="<h1>Window test</h1>" />
                    <ext:Window runat="server" Scrollable="Both" MaxHeight="2000" Width="500" ConstrainHeader="true">
                        <Items>
                            <ext:DisplayField runat="server" Text="Hidden text"></ext:DisplayField>
                            <ext:Panel runat="server" Height="3000" />
                        </Items>
                    </ext:Window>
                </Items>
            </ext:Viewport>
        </form>
    </body>
    </html>
    Thanks by the way for noting you don't want the window to just fit on screen, that'd be the obvious answer here.

    It is always a good idea to use a viewport in pages to help handling what's on screen. Most examples explorer samples won't employ it just for the sake of simplicity.

    In the example, I just added the Viewport component, specifying it should be scrollable whenever contents don't fit in. Then I set window's ConstrainHeader to ensure window header is always visible in the viewport no matter what (you can scroll it out of view but it will always be reachable from within the viewport).

    This constrained setting is specially interesting as it won't allow the user to move the window outside the viewport and make it (again) unable to be seen.

    Hope this helps!
    Fabrício Murta
    Developer & Support Expert
  3. #3
    ok perfect, clear and undestable,
    thanks a lot, please close this thread
  4. #4
    Thanks for the kind feedback, and glad it helped!
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Replies: 1
    Last Post: Oct 26, 2012, 5:34 PM
  2. [CLOSED] IIS7 Windows 7 x Windows 2008
    By majunior in forum 1.x Legacy Premium Help
    Replies: 14
    Last Post: Nov 08, 2011, 6:56 PM
  3. [CLOSED] Desktop BUG: Modal windows can be minimized and you can interact with the other windows
    By juanpablo.belli@huddle.com.ar in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 31, 2009, 2:49 PM
  4. Replies: 1
    Last Post: Mar 17, 2009, 1:17 AM
  5. Replies: 1
    Last Post: Mar 29, 2008, 7:04 PM

Posting Permissions