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.

Resizing Custom UO

3 posts in Objects Last posting was on 2010-05-28 17:21:20.0Z
Arnoud Oortwijk Posted on 2010-05-27 14:51:26.0Z
Sender: 1b32.4bfe8651.1804289383@sybase.com
From: Arnoud Oortwijk
Newsgroups: sybase.public.powerbuilder.objects
Subject: Resizing Custom UO
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4bfe86ee.1b5b.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 27 May 2010 07:51:26 -0700
X-Trace: forums-1-dub 1274971886 10.22.241.41 (27 May 2010 07:51:26 -0700)
X-Original-Trace: 27 May 2010 07:51:26 -0700, 10.22.241.41
Lines: 14
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:10005
Article PK: 712559

Hi,

I have created a Visual UO and put in on a Window. I would
like to allow the user to change the size of it by using the
mouse.

i've been playing around with the mousemove, lbuttonup and
lbuttondown event, but dont' seem to get it to work.

Does anybody have any ideas or a sample I could use.

Help will be greatly appreciated.

Arnoud


neil Posted on 2010-05-28 10:12:45.0Z
Sender: 4036.4bff3fff.1804289383@sybase.com
From: Neil
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: Resizing Custom UO
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4bff971d.4c2c.1681692777@sybase.com>
References: <4bfe86ee.1b5b.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 28 May 2010 03:12:45 -0700
X-Trace: forums-1-dub 1275041565 10.22.241.41 (28 May 2010 03:12:45 -0700)
X-Original-Trace: 28 May 2010 03:12:45 -0700, 10.22.241.41
Lines: 47
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:10006
Article PK: 712556

One solution is to do a lot of coding... wrap the UO control
with line or static text control that disguise to be a
border of the UO control, so, basically, you will have 8 pcs
of it. left,right,top, bottom and on 4 corners... but maybe
you can disregard the corners.

on each control, you have to add an event for
mousemove(pbm_mousemove), mouseup(pbm_lbuttonup) and
mousedown(pbm_lbuttondown).

On mousemove event, check for the keydown... like this:

If KeyDown(keyLeftButton!) Then
This.x = Parent.PointerX()
End If

On mouseup, then resize the UO accordingly using the x and y
values of the control being moved.

On mousedown, do some trick to mimick the control as a
border to your UO control.

all controls that you wrap on your UO shares the same code.

Another solution, if your window contains only your UO
control or your UO size should be relative to the window
size, then you might want the user to resize the window only
instead of the UO, then just adjust the size the UO
accordingly relative to the window.

HTH

> Hi,
>
> I have created a Visual UO and put in on a Window. I would
> like to allow the user to change the size of it by using
> the mouse.
>
> i've been playing around with the mousemove, lbuttonup and
> lbuttondown event, but dont' seem to get it to work.
>
> Does anybody have any ideas or a sample I could use.
>
> Help will be greatly appreciated.
>
> Arnoud


Philip Salgannik Posted on 2010-05-28 17:21:20.0Z
From: "Philip Salgannik" <philip@MeMyselfAndI.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <4bfe86ee.1b5b.1681692777@sybase.com>
Subject: Re: Resizing Custom UO
Lines: 28
Organization: MeMyselfAndI
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4bfffb90$1@forums-1-dub>
Date: 28 May 2010 10:21:20 -0700
X-Trace: forums-1-dub 1275067280 10.22.241.152 (28 May 2010 10:21:20 -0700)
X-Original-Trace: 28 May 2010 10:21:20 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:10007
Article PK: 712560

The least code intensive solution would be to create a resizable (with
border) child window, place your UO on it (make it's border lowered), put
these 2 lines of code in the resize event of the window:
yourUO.width = newwidth
yourUO.height = newheight

and then just open this child window in the open event of the window in
which You intended to have your UO.

<Arnoud Oortwijk> wrote in message
news:4bfe86ee.1b5b.1681692777@sybase.com...
> Hi,
>
> I have created a Visual UO and put in on a Window. I would
> like to allow the user to change the size of it by using the
> mouse.
>
> i've been playing around with the mousemove, lbuttonup and
> lbuttondown event, but dont' seem to get it to work.
>
> Does anybody have any ideas or a sample I could use.
>
> Help will be greatly appreciated.
>
> Arnoud
>