Sign in to follow this  
Followers 0
Floppy

Problem with ListView

4 posts in this topic

Why if I create a ListView with $LVS_EX_CHECKBOXES ex-style I lost the border of the ListView?

Share this post


Link to post
Share on other sites



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

WEnd

The 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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Thanks, but the Help file contains several mistakes and/or omissions.

It's time to fix it!

Edited by FSoft

Share this post


Link to post
Share on other sites

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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