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.

Getting X & Y Position

3 posts in Objects Last posting was on 2006-07-17 16:58:25.0Z
Ranjith T Posted on 2006-07-16 13:33:32.0Z
Sender: 1430.44ba3fe8.1804289383@sybase.com
From: Ranjith T
Newsgroups: sybase.public.powerbuilder.objects
Subject: Getting X & Y Position
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <44ba402c.1434.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 16 Jul 2006 06:33:32 -0700
X-Trace: forums-1-dub 1153056812 10.22.241.41 (16 Jul 2006 06:33:32 -0700)
X-Original-Trace: 16 Jul 2006 06:33:32 -0700, 10.22.241.41
Lines: 28
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:8943
Article PK: 736140

Dear All,

I am creating user objects dynamically and allowing user to
Drag & drop anywhere in window. It is working fine when user
drags the object without the actual size of the window.

When they scroll the window for placing then object I am not
able to get the X & Y position from the top of the window.

let me explain more clearely.

1. It is a datawindow user object.
2. In that user object, in the lbutton event I positioned
picture as per the Xpos & Ypos arguments.
3. Those two arguments returns the mouse position not from
the top of the window.

Finally What I want to know is, I want to findout how much
powerbuilder units / pixels have been scrolled by the user.

its very urgent, plz help me out to solve the problem at the
earliest as possible,

Thanks in advance for any help

Regards,

Ranjith T


acme Posted on 2006-07-16 16:33:04.0Z
From: "acme" <hbni@163.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <44ba402c.1434.1681692777@sybase.com>
Subject: Re: Getting X & Y Position
Lines: 38
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-Original-NNTP-Posting-Host: 125.96.100.70
Message-ID: <44ba68a7$1@forums-2-dub>
X-Original-Trace: 16 Jul 2006 09:26:15 -0700, 125.96.100.70
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 16 Jul 2006 09:26:17 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 16 Jul 2006 09:33:04 -0700
X-Trace: forums-1-dub 1153067584 10.22.108.75 (16 Jul 2006 09:33:04 -0700)
X-Original-Trace: 16 Jul 2006 09:33:04 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:8945
Article PK: 736141

hi,Ranjith

if u_dw is on the window, may the following equation could help you
u_dw.pointx() + u_dw.x = window.pointx()
u_dw.pointy() + u_dw.y = window.pointy()
It is not very accurate because Pixels to units

<Ranjith T> дÈëÏûÏ¢ÐÂÎÅ:44ba402c.1434.1681692777@sybase.com...

> Dear All,
>
> I am creating user objects dynamically and allowing user to
> Drag & drop anywhere in window. It is working fine when user
> drags the object without the actual size of the window.
>
> When they scroll the window for placing then object I am not
> able to get the X & Y position from the top of the window.
>
> let me explain more clearely.
>
> 1. It is a datawindow user object.
> 2. In that user object, in the lbutton event I positioned
> picture as per the Xpos & Ypos arguments.
> 3. Those two arguments returns the mouse position not from
> the top of the window.
>
> Finally What I want to know is, I want to findout how much
> powerbuilder units / pixels have been scrolled by the user.
>
> its very urgent, plz help me out to solve the problem at the
> earliest as possible,
>
> Thanks in advance for any help
>
> Regards,
>
> Ranjith T


Brad Wery [TeamSybase] Posted on 2006-07-17 16:58:25.0Z
From: "Brad Wery [TeamSybase]" <bradweryatagricoreunited.com>
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: Getting X & Y Position
References: <44ba402c.1434.1681692777@sybase.com>
In-Reply-To: <44ba402c.1434.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: ugg10.unitedgrain.ca
X-Original-NNTP-Posting-Host: ugg10.unitedgrain.ca
Message-ID: <44bbc1b1@forums-1-dub>
Date: 17 Jul 2006 09:58:25 -0700
X-Trace: forums-1-dub 1153155505 165.23.247.49 (17 Jul 2006 09:58:25 -0700)
X-Original-Trace: 17 Jul 2006 09:58:25 -0700, ugg10.unitedgrain.ca
Lines: 44
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:8946
Article PK: 736145

You may be able to get the scroll position from the pbm_vscroll and
pbm_hscroll events. In these events update a couple instance variables
using the scrollpos parameter. Use the instance variables in your x and
y calculations.

//hscroll
il_hscroll = scrollpos

//vscroll
il_vscroll = scrollpos

I hope this does it for you.

Brad

Ranjith T wrote:
> Dear All,
>
> I am creating user objects dynamically and allowing user to
> Drag & drop anywhere in window. It is working fine when user
> drags the object without the actual size of the window.
>
> When they scroll the window for placing then object I am not
> able to get the X & Y position from the top of the window.
>
> let me explain more clearely.
>
> 1. It is a datawindow user object.
> 2. In that user object, in the lbutton event I positioned
> picture as per the Xpos & Ypos arguments.
> 3. Those two arguments returns the mouse position not from
> the top of the window.
>
> Finally What I want to know is, I want to findout how much
> powerbuilder units / pixels have been scrolled by the user.
>
> its very urgent, plz help me out to solve the problem at the
> earliest as possible,
>
> Thanks in advance for any help
>
> Regards,
>
> Ranjith T