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 

An application with several tabs with several listviews

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



Joined: 12 May 2005
Posts: 205
Location: Münster, Germany

PostPosted: Tue Apr 29, 2008 1:09 pm    Post subject: An application with several tabs with several listviews Reply with quote

Hi, Community,
I stumbled into a problem wih tabs and found no solution in the manual or in the forum.
I can't show you my code, because it's a too big programme and it would be hard to isolate my problem. So I have to describe what happens.
I've got a main gui (Gui No. 1) with a tab wherin reside four listviews and everything works fine. On each listview I coded some LV_ModifyCol to manipulate the width of the columns.
Now I created a button and when you click it another gui (Gui No.7) appears.
Here I created a tab with again some listviews. So far so good.
Now I want to change on this gui 7 the width of the columns of the listviews.
When execution reaches the LV_ModifyCol's, the width of the columns of the tab in the first gui (gui no. 1) are changed!
Is it that I have to give focus to a tab and its listviews? And how?
I hope my description is good enough!
Thanks in advance,
Klaus
Back to top
View user's profile Send private message Send e-mail
tic



Joined: 22 Apr 2007
Posts: 1375

PostPosted: Tue Apr 29, 2008 1:24 pm    Post subject: Reply with quote

Quote:
All of the ListView functions operate upon the current thread's default GUI window (which can be changed via Gui, 2:Default). If the default window does not exist or has no ListView controls, all functions return zero to indicate the problem.

If the window has more than one ListView control, by default the functions operate upon the one most recently added. To change this, specify Gui, ListView, ListViewName, where ListViewName is the name of the ListView's associated variable or its ClassNN as shown by Window Spy. Once changed, all existing and future threads will use the indicated ListView.

When the phrase "row number" is used on this page, it refers to a row's current position within the ListView. The top row is 1, the second row is 2, and so on. After a row is added, its row number tends to change due to sorting, deleting, and inserting of other rows. Therefore, to locate specific row(s) based on their contents, it is usually best to use LV_GetText() in a loop.
Back to top
View user's profile Send private message
Klaus



Joined: 12 May 2005
Posts: 205
Location: Münster, Germany

PostPosted: Tue Apr 29, 2008 3:49 pm    Post subject: Reply with quote

Thank you, tic,
that's exactly the hint I needed!
Klaus
Back to top
View user's profile Send private message Send e-mail
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