Sign in to follow this  
Followers 0
rajeshwaran

How to design (position) controls for a complete view in all resolutions

3 posts in this topic

#1 ·  Posted (edited)

I have created a Window and Listview control (a lengthy listview) with 1366x768 resolution, now my listview (all) items and subitems are displaying without scroll bar.

After I have changed my resolution to 1024x768 my Listview appears at the same X, Y position with scroll bar appeared, but I cant view all items and subitems, at one shot, I need to move scroll bar to view the hidden items.

So, how to design (position) controls for a complete view in all resolutions.

Edited by rajeshwaran

Share this post


Link to post
Share on other sites



A simple way is create GUI and controls in low resolution (like 1024x768).

Share this post


Link to post
Share on other sites

not sure 100% sure what you are asking for, but something like this??

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiListView.au3>

$Form = GUICreate("Hello", 800, 480, -1, -1, BitOR($WS_SYSMENU, $WS_MAXIMIZEBOX, $WS_MINIMIZEBOX, $WS_THICKFRAME, $WS_CLIPSIBLINGS))

$Listview = GUICtrlCreateListView("Test 1|Test 2|Test 3", 10, 10, 780, 435, -1)
GUICtrlSetResizing($Listview, BitOR($GUI_DOCKLEFT, $GUI_DOCKRIGHT, $GUI_DOCKTOP, $GUI_DOCKBOTTOM))

GUIRegisterMsg($WM_SIZE, "WM_SIZE")

GUISetState()

While 1
    $Msg = GUIGetMsg()
    Switch $Msg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

Func WM_SIZE($hWnd, $iMsg, $wParam, $lParam)
    Local $width = BitAND($lParam, 0x0000FFFF) - 22
    _GUICtrlListView_SetColumnWidth($Listview, 0, $width / 3)
    _GUICtrlListView_SetColumnWidth($Listview, 1, $width / 3)
    _GUICtrlListView_SetColumnWidth($Listview, 2, $width / 3)
EndFunc

[font="Impact"]Never fear, I is here.[/font]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0