Floppy Posted August 20, 2009 Share Posted August 20, 2009 Why if I create a ListView with $LVS_EX_CHECKBOXES ex-style I lost the border of the ListView? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 20, 2009 Moderators Share Posted August 20, 2009 FSoft,Although it does not specifically state so in the Help file, I would imagine that there is a default $WS_EX_CLIENTEDGE style when the ListView is created. So when you use your $LVS_EX_CHECKBOXES, you overwrite that style = no border. The answer is to use BitOR to combine the default and additional styles to make sure they are all included:#include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <WindowsConstants.au3> $hGUI = GUICreate("Test", 500, 500) GUICtrlCreateListView("", 10, 10, 480, 200, -1, BitOr($LVS_EX_CHECKBOXES, $WS_EX_CLIENTEDGE) ) GUICtrlCreateListView("", 10, 250, 480, 200) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEndThe same problem can arise with any control - if you add your own styles, you must make sure that you combine them with any of the default styles you wish to retain. Using BitOR is the best way - sometimes simple addition works, but not always.M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Floppy Posted August 20, 2009 Author Share Posted August 20, 2009 (edited) Thanks, but the Help file contains several mistakes and/or omissions. It's time to fix it! Edited August 20, 2009 by FSoft Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 20, 2009 Moderators Share Posted August 20, 2009 FSoft,Do not be too hard on the Help file - it is still one of the, if not the, best out there!And are you offering to help? Remember everything here depends on volunteers. >_< M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
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