| View previous topic :: View next topic |
| Author |
Message |
IsNull
Joined: 10 May 2007 Posts: 64 Location: .switzerland
|
Posted: Wed Apr 23, 2008 8:39 am Post subject: [solved] How to get the Title-Names of Colums in a Listview |
|
|
Hello,
Background:
I'm writing a function wich allows editing multiple Listview-Rows by displaying a mini GUI.
| Code: | | Dialog_LV_MultipleEdit(Row_List) |
The only param (at the moment) is a List of the Rows who should be edited at the same time. So, the mini Gui of this Function is autogeneratet, because I want to use this function in other Scripts with other numbers of Colums. The number of Colums can be easily gathered by using LV_GetCount("Column"). But how can I gather the Colum-Title for every colum who is present?
regards
IsNull _________________ http://securityvision.ch

Last edited by IsNull on Wed Apr 23, 2008 1:43 pm; edited 1 time in total |
|
| Back to top |
|
 |
skwire
Joined: 18 Jan 2006 Posts: 132 Location: Conway, Arkansas
|
Posted: Wed Apr 23, 2008 11:57 am Post subject: |
|
|
Consider the following example:
| Code: | Gui, Add, Listview, xm ym+10 w200 h100 , Red|Blue|Green
Gui, Add, Button , xm+10 ym+115 w180 h20 gShow_Me, Get column headers
Gui, Show, AutoSize
Return
Show_Me:
{
Loop, % LV_GetCount( "Col" ) ; Loop for however many columns are in the listview.
{
LV_GetText( myHeader, 0, A_INDEX ) ; Get column header.
Header_List .= myHeader . "`n" ; Build output data.
}
MsgBox, % Header_List
}
Return
GuiEscape:
GuiClose:
{
ExitApp
}
Return
|
Last edited by skwire on Wed Apr 23, 2008 1:55 pm; edited 1 time in total |
|
| Back to top |
|
 |
IsNull
Joined: 10 May 2007 Posts: 64 Location: .switzerland
|
Posted: Wed Apr 23, 2008 1:43 pm Post subject: |
|
|
I'didnt found this "header" option in the help! 0 = header....sure Thank's a lot  _________________ http://securityvision.ch
 |
|
| Back to top |
|
 |
skwire
Joined: 18 Jan 2006 Posts: 132 Location: Conway, Arkansas
|
Posted: Wed Apr 23, 2008 1:55 pm Post subject: |
|
|
| IsNull wrote: | I'didnt found this "header" option in the help! 0 = header....sure Thank's a lot  |
To clarify, "header" is not an option...it's a variable name. I probably should have named it "myHeader" in the code to prevent confusion. In fact, I'll change it. |
|
| Back to top |
|
 |
IsNull
Joined: 10 May 2007 Posts: 64 Location: .switzerland
|
Posted: Wed Apr 23, 2008 4:26 pm Post subject: |
|
|
I already understood. I have probably expressed stupid.
(I didn't know that he returns the Colum Title/header for the Row-Number "0". )
best regards...
IsNull _________________ http://securityvision.ch
 |
|
| Back to top |
|
 |
|