Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Pressed Buttons

75 views
Skip to first unread message

Philip Salgannik

unread,
Jul 18, 2003, 2:00:57 PM7/18/03
to
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 is a FAQ, read Help, then search
www.groups.google.com/advanced_group_search

pbm_thisusuallydoesnothelp:-))
Philip Salgannik

"Tyler Craft" <NoSpamTy...@gnb.ca> wrote in message
news:u21tCaVTDHA.344@forums-2-dub...
> 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" <pn...@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
>
>


Piotr

unread,
Jul 18, 2003, 1:47:53 PM7/18/03
to

Tyler Craft

unread,
Jul 18, 2003, 1:52:12 PM7/18/03
to
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" <pn...@o2.pl> wrote in message news:OQKA4SVTDHA.50@forums-2-dub...

Tyler Craft

unread,
Jul 18, 2003, 2:01:48 PM7/18/03
to
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" <pn...@o2.pl> wrote in message news:OQKA4SVTDHA.50@forums-2-dub...

0 new messages