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.

How can i determine in which part of splitted Grid-Datawindow was clicked?

2 posts in DataWindow Last posting was on 2008-06-30 15:47:53.0Z
Christof Zottmann Posted on 2008-06-30 14:46:34.0Z
From: Christof Zottmann <zottmann.n-o-s_p-a_m@ernst-gun.de>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: How can i determine in which part of splitted Grid-Datawindow was clicked?
Message-ID: <norh64d9r03qul1gn753orgkoc7rokcs17@4ax.com>
X-Newsreader: Forte Agent 4.2/32.1118
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 30 Jun 2008 07:46:34 -0700
X-Trace: forums-1-dub 1214837194 10.22.241.152 (30 Jun 2008 07:46:34 -0700)
X-Original-Trace: 30 Jun 2008 07:46:34 -0700, vip152.sybase.com
Lines: 29
X-Authenticated-User: pb110beta
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87275
Article PK: 416532

Hello!

I work on a function to autosize the width of a grid-datawindow like
in Windows Explorer or Excel (doubleclick in the header between to
columns to sort the left column).

My problem was to find out, which column is the one who should be
autosized, because GetObjectAtPointer() can return no value or one of
the two columns involved, depending how exactly the user has
positioned the mouse-pointer.

So I take the x-position of the doubleclicked-event, convert it to
PB-Units. Then I spin through all header-columns of the datawindow and
save the highest x-position of the object that is smaller then the
x-position of the mouse-pointer.

It worked well, but only till I move the horizontal scroll bar to
right. But it's also no problem, because I add the value that returns
Describe("DataWindow.HorizontalScrollPosition") to the
mouse-x-position. It works also.

But if the grid is splitable, I have a problem, because I don't know,
in which part of the splitted datawindow was doubleclicked.

Does anyone know how I can find this out?

Thanks in advance

Christof Zottmann


Christof Zottmann Posted on 2008-06-30 15:47:53.0Z
From: Christof Zottmann <zottmann.n-o-s_p-a_m@ernst-gun.de>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: How can i determine in which part of splitted Grid-Datawindow was clicked?
Message-ID: <tuvh645efg72sfrofocgqlf0pbq6a6be5h@4ax.com>
References: <norh64d9r03qul1gn753orgkoc7rokcs17@4ax.com>
X-Newsreader: Forte Agent 4.2/32.1118
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 30 Jun 2008 08:47:53 -0700
X-Trace: forums-1-dub 1214840873 10.22.241.152 (30 Jun 2008 08:47:53 -0700)
X-Original-Trace: 30 Jun 2008 08:47:53 -0700, vip152.sybase.com
Lines: 32
X-Authenticated-User: pb110beta
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87279
Article PK: 416537

On 30 Jun 2008 07:46:34 -0700, Christof Zottmann

<zottmann.n-o-s_p-a_m@ernst-gun.de> wrote:

>I work on a function to autosize the width of a grid-datawindow like
>in Windows Explorer or Excel (doubleclick in the header between to
>columns to sort the left column).
>
>My problem was to find out, which column is the one who should be
>autosized, because GetObjectAtPointer() can return no value or one of
>the two columns involved, depending how exactly the user has
>positioned the mouse-pointer.
>
>So I take the x-position of the doubleclicked-event, convert it to
>PB-Units. Then I spin through all header-columns of the datawindow and
>save the highest x-position of the object that is smaller then the
>x-position of the mouse-pointer.
>
>It worked well, but only till I move the horizontal scroll bar to
>right. But it's also no problem, because I add the value that returns
>Describe("DataWindow.HorizontalScrollPosition") to the
>mouse-x-position. It works also.
>
>But if the grid is splitable, I have a problem, because I don't know,
>in which part of the splitted datawindow was doubleclicked.
>
>Does anyone know how I can find this out?

Sorry for the post. I found it out by myself. If I compare
Describe("DataWindow.HorizontalScrollSplit") with XPos, then I know
where was doubleclicked.

Thanks!