Task Panel Group click event? |
Post Reply |
Author | |
pate
Groupie Joined: 27 April 2009 Status: Offline Points: 36 |
Post Options
Thanks(0)
Posted: 07 April 2010 at 11:35am |
Hi All,
In task Panel, is there some way to detect a click on a Group header? All I can see is an ItemClick event. I want to close the other groups that are open when I expand another one. The only way I have found to detect this is the wndTaskPanel_GroupExpanded event, but when I set the other groups to Expanded = False from that sub, they in turn call this same routine and it gets stuck in a recursive loop. I have implemented a workaround with a form level boolean to exit the sub at the top while this is going on, but there has to be an easier way than this. Any ideas?
-Melvyn
VB6
CodeJock 13.2.1
|
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
There may be better events to use (I'm not sure, I don't use the TaskPanel), but you can prevent the recursion from causing problems as follows:
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
pate
Groupie Joined: 27 April 2009 Status: Offline Points: 36 |
Post Options
Thanks(0)
|
Thanks for the reply. Yes, that is prtty much what I am doing now, just with a global variable instead of a static variable but works the same. Seems like a real good place for a new event (GroupClick) or a new property (ExpandSelectedGroupOnly).
-Melvyn
|
|
Carlos Rocha
Groupie Joined: 11 February 2008 Location: Portugal Status: Offline Points: 92 |
Post Options
Thanks(0)
|
SuitePro 20.3.0
OS: Windows 10 Language: Visual Objects 2.8 |
|
pate
Groupie Joined: 27 April 2009 Status: Offline Points: 36 |
Post Options
Thanks(0)
|
CodeJock, what say you? I know it is not a sexy feature, but I think it is really needed to be able to use this control effectively.
-Melvyn
|
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
I agree that more events are necessary - maybe you would like to start a sticky TODO list for the TaskPanel control?
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Baldur
Senior Member Joined: 22 November 2006 Location: Germany Status: Offline Points: 244 |
Post Options
Thanks(0)
|
To prevent recursion, you have to check the current state first.
If the current state is the correct state, don't change it to the same state again. This will call recursivly the events.
This happens not only to codejock-controls.
if mycontrols.state <> wantedstate then
mycontrols.state = wantedstate
end if
in this case, the recursion doesn't matter.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |