rajeshwaran Posted September 6, 2010 Posted September 6, 2010 (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 September 6, 2010 by rajeshwaran
rajeshwaran Posted September 7, 2010 Author Posted September 7, 2010 A simple way is create GUI and controls in low resolution (like 1024x768).
Alek Posted September 7, 2010 Posted September 7, 2010 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]
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now