Jump to content

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


rajeshwaran
 Share

Recommended Posts

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
Link to comment
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]

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...