Jump to content
Sign in to follow this  
Luigi

Help with GUICtrlCreateListView and GUICtrlCreateListViewItem

Recommended Posts

Luigi

Greetings,

I am ask about diferences between [A]"GUICtrlCreateListView" and "GUICtrlCreateListViewItem" to create a ListView...

Im my scripts I thinking what [A] is for only one column...

And can used to one or more columns...

In my script have a table with ListView and use this a GUICtrlCreateListView, this is correct use for it?

ID |Name |Email |Telephone

1 |John |j@b.com |20202020

2 |Mary |m@b.com |30303030

Other question, when I click a line, the blue box selection's mark all field's from the line, but, note all line. I see in other programs what the selection is for all line, include fields without data. Is possible make this?

Apologize-me any mistake, english is not my native language and google translate help, perhaps somethins is missing...

Edited by detefon

Visit my repository

Share this post


Link to post
Share on other sites
Andreik

Difference between GuiCtrlCreateListView() and GuiCtrlCreateListViewItem()is shown below:

Posted Image

And to be able to select full row in your ListView control set as ex-style $LVS_EX_FULLROWSELECT.


When the words fail... music speaks

Share this post


Link to post
Share on other sites
Luigi

Posted Image

In my script, that is the result, but I want select all line, include the space after '4433221100', iss possible?

I use this code...

_GUICtrlListView_SetExtendedListViewStyle($ListaCadastro,BitOr($LVS_EX_GRIDLINES,$LVS_EX_FULLROWSELECT))
Global $ListaCadastroRodape = GUICtrlCreateListView("", 20, 380, 760, 21)

Can I use more 'ListView Extended Styles' or only this?

Another question, is possible create a column with a fix size? or not resizable?


Visit my repository

Share this post


Link to post
Share on other sites
Melba23

detefon,

Can I use more 'ListView Extended Styles' or only this?

The Help file entry for _GUICtrlListView_SetExtendedListViewStyle shows you al lthe extended styles that are available. :)

is possible create a column with a fix size? or not resizable?

Yes.

- You can use _GUICtrlListView_SetColumnWidth to set a specific width. Note the special $LVSCW_AUTOSIZE_USEHEADER value - if you use this for the final column, you will lose the spaces to the right which annoy you so much. ;)

- To prevent column being resized, you need to disable the headers:

ControlDisable($hGUI, "", HWnd(_GUICtrlListView_GetHeader($hListView)))

And before you ask, to re-enable resizing you use ControlEnable.

All clear? ;)

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
Luigi

@Thanks Melba, I can lock my column with

ControlDisable($hGUI, "", HWnd(_GUICtrlListView_GetHeader($hListView)))

8D

Edited by detefon

Visit my repository

Share this post


Link to post
Share on other sites
Melba23

detefon,

Glad I could help. :)

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.