Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Pressed Buttons

4 posts in Objects Last posting was on 2003-07-18 18:01:48.0Z
Piotr Posted on 2003-07-18 17:47:53.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Piotr" <pnad@o2.pl>
Organization: 212.76.33.73
X-Newsreader: AspNNTP 1.50 (Tri Hoang)
Subject: Pressed Buttons
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Date: Fri, 18 Jul 2003 10:47:53 -0700
NNTP-Posting-Host: transinc-win02.netoptex.com 206.169.167.22
Lines: 16
Message-ID: <364_OQKA4SVTDHA.50@forums-2-dub>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums-2-dub.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:7495
Article PK: 734784

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


Tyler Craft Posted on 2003-07-18 17:52:12.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Tyler Craft" <NoSpamTyler.Craft@gnb.ca>
Subject: Re: Pressed Buttons
Date: Fri, 18 Jul 2003 14:52:12 -0300
Lines: 43
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 182.27.gnb.ca 142.139.182.27
Message-ID: <364_u21tCaVTDHA.344@forums-2-dub>
References: <364_OQKA4SVTDHA.50@forums-2-dub>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums-2-dub.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:7496
Article PK: 734781

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" <pnad@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


Philip Salgannik Posted on 2003-07-18 18:00:57.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Philip Salgannik" <philemax@comcast.net>
Subject: Re: Pressed Buttons
Date: Fri, 18 Jul 2003 14:00:57 -0400
Lines: 61
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: h0020af718683.ne.client2.attbi.com 24.34.75.150
Message-ID: <364_O7gZ7eVTDHA.261@forums-2-dub>
References: <364_OQKA4SVTDHA.50@forums-2-dub> <364_u21tCaVTDHA.344@forums-2-dub>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums-2-dub.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:7497
Article PK: 734783

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" <NoSpamTyler.Craft@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" <pnad@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
>
>


Tyler Craft Posted on 2003-07-18 18:01:48.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Tyler Craft" <NoSpamTyler.Craft@gnb.ca>
Subject: Re: Pressed Buttons
Date: Fri, 18 Jul 2003 15:01:48 -0300
Lines: 30
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 182.27.gnb.ca 142.139.182.27
Message-ID: <364_Oq1rZfVTDHA.349@forums-2-dub>
References: <364_OQKA4SVTDHA.50@forums-2-dub>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums-2-dub.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:7498
Article PK: 734788

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" <pnad@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