He is probably thinking about windows taskbar, where this behaviour is implemented thru a paticular style of a tab control (this style unfortunately i not supported by PB wrappers of Micro$oft's tab control, although I numerously requested it as an enhancement request).
> This goes against the default way that a command button works so short > answer is you can't with the commandbutton control.
> In order to do this you must roll your own command button as a userobject IE > two labels, offset from each other to give the effect of a commandbutton ( > its all it really is anyway). > In the clicked of the top label check your instance boolean ib_raised
> //Puesdo start not tested > If ib_raised Then > l_top.x = l_bottom.x + 5 > l_top.y = l_bottom.y + 5 > else > l_top.x = l_bottom.x - 5 > l_top.y = l_bottom.y - 5 > End if > ib_raised = Not ib_raised > //Puesdo end
> you would then just trigger and event on the userobject that you would place > the code you need to happen.
> "Piotr" <p...@o2.pl> wrote in message news:OQKA4SVTDHA.50@forums-2-dub... > > Hello again, the problem is: Suppose you have a CommandButton. When you > click on > > it using left mouse button and hold it, the CommandButton will be in > pressed > > state. When you push the left mouse button up, the CommandButton will > return to > > its default, lets say, unpressed state. How to obtain the situation that > after > > pushing the left mouse button up, the CommandButton will be still in > pressed > > state? I other words clicking on the CommandButton will be changing its > state > > from pressed to unpressed and vice-versa. Thnx... > > ---== Posted via the PFCGuide Web Newsreader ==--- > > http://www.pfcguide.com/_newsgroups/group_list.asp
Hello again, the problem is: Suppose you have a CommandButton. When you click on it using left mouse button and hold it, the CommandButton will be in pressed state. When you push the left mouse button up, the CommandButton will return to its default, lets say, unpressed state. How to obtain the situation that after pushing the left mouse button up, the CommandButton will be still in pressed state? I other words clicking on the CommandButton will be changing its state from pressed to unpressed and vice-versa. Thnx... ---== Posted via the PFCGuide Web Newsreader ==--- http://www.pfcguide.com/_newsgroups/group_list.asp
This goes against the default way that a command button works so short answer is you can't with the commandbutton control.
In order to do this you must roll your own command button as a userobject IE two labels, offset from each other to give the effect of a commandbutton ( its all it really is anyway). In the clicked of the top label check your instance boolean ib_raised
//Puesdo start not tested If ib_raised Then l_top.x = l_bottom.x + 5 l_top.y = l_bottom.y + 5 else l_top.x = l_bottom.x - 5 l_top.y = l_bottom.y - 5 End if ib_raised = Not ib_raised //Puesdo end
you would then just trigger and event on the userobject that you would place the code you need to happen.
"Piotr" <p...@o2.pl> wrote in message news:OQKA4SVTDHA.50@forums-2-dub... > Hello again, the problem is: Suppose you have a CommandButton. When you click on > it using left mouse button and hold it, the CommandButton will be in pressed > state. When you push the left mouse button up, the CommandButton will return to > its default, lets say, unpressed state. How to obtain the situation that after > pushing the left mouse button up, the CommandButton will be still in pressed > state? I other words clicking on the CommandButton will be changing its state > from pressed to unpressed and vice-versa. Thnx... > ---== Posted via the PFCGuide Web Newsreader ==--- > http://www.pfcguide.com/_newsgroups/group_list.asp
Or better yet use one label on user object with this code in the clicked event of the label. Just create the userevent ue_clicked for special handling.
If ib_raised Then this.borderstyle = StyleLowered! else this.borderstyle = StyleRaised! End if ib_raised = Not ib_raised this.triggerevent('ue_clicked')
"Piotr" <p...@o2.pl> wrote in message news:OQKA4SVTDHA.50@forums-2-dub... > Hello again, the problem is: Suppose you have a CommandButton. When you click on > it using left mouse button and hold it, the CommandButton will be in pressed > state. When you push the left mouse button up, the CommandButton will return to > its default, lets say, unpressed state. How to obtain the situation that after > pushing the left mouse button up, the CommandButton will be still in pressed > state? I other words clicking on the CommandButton will be changing its state > from pressed to unpressed and vice-versa. Thnx... > ---== Posted via the PFCGuide Web Newsreader ==--- > http://www.pfcguide.com/_newsgroups/group_list.asp