Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Task Panel
  New Posts New Posts RSS Feed - Task Panel Group click event?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Task Panel Group click event?

 Post Reply Post Reply
Author
Message
pate View Drop Down
Groupie
Groupie


Joined: 27 April 2009
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote pate Quote  Post ReplyReply Direct Link To This Post Topic: Task Panel Group click event?
    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
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 07 April 2010 at 1:09pm
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:


Static s_Changing As Boolean

If Not s_Changing Then
   s_Changing = True

   ' Change your expanded property here

   s_Changing = False
End If

Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
pate View Drop Down
Groupie
Groupie


Joined: 27 April 2009
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote pate Quote  Post ReplyReply Direct Link To This Post Posted: 07 April 2010 at 1:24pm
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
Back to Top
Carlos Rocha View Drop Down
Groupie
Groupie


Joined: 11 February 2008
Location: Portugal
Status: Offline
Points: 92
Post Options Post Options   Thanks (0) Thanks(0)   Quote Carlos Rocha Quote  Post ReplyReply Direct Link To This Post Posted: 07 April 2010 at 6:15pm
SuitePro 20.3.0
OS: Windows 10
Language: Visual Objects 2.8
Back to Top
pate View Drop Down
Groupie
Groupie


Joined: 27 April 2009
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote pate Quote  Post ReplyReply Direct Link To This Post Posted: 08 April 2010 at 1:48am
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
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 08 April 2010 at 2:19pm
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

Back to Top
Baldur View Drop Down
Senior Member
Senior Member


Joined: 22 November 2006
Location: Germany
Status: Offline
Points: 244
Post Options Post Options   Thanks (0) Thanks(0)   Quote Baldur Quote  Post ReplyReply Direct Link To This Post Posted: 14 May 2010 at 5:29am
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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.