AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[solved] How to get the Title-Names of Colums in a Listview

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
IsNull



Joined: 10 May 2007
Posts: 64
Location: .switzerland

PostPosted: Wed Apr 23, 2008 8:39 am    Post subject: [solved] How to get the Title-Names of Colums in a Listview Reply with quote

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
View user's profile Send private message
skwire



Joined: 18 Jan 2006
Posts: 132
Location: Conway, Arkansas

PostPosted: Wed Apr 23, 2008 11:57 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
IsNull



Joined: 10 May 2007
Posts: 64
Location: .switzerland

PostPosted: Wed Apr 23, 2008 1:43 pm    Post subject: Reply with quote

I'didnt found this "header" option in the help! 0 = header....sure Thank's a lot Wink
_________________
http://securityvision.ch
Back to top
View user's profile Send private message
skwire



Joined: 18 Jan 2006
Posts: 132
Location: Conway, Arkansas

PostPosted: Wed Apr 23, 2008 1:55 pm    Post subject: Reply with quote

IsNull wrote:
I'didnt found this "header" option in the help! 0 = header....sure Thank's a lot Wink


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
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
IsNull



Joined: 10 May 2007
Posts: 64
Location: .switzerland

PostPosted: Wed Apr 23, 2008 4:26 pm    Post subject: Reply with quote

I already understood. I have probably expressed stupid. Laughing
(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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group