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.

What event to trap this grid pointer?

5 posts in DataWindow Last posting was on 2009-03-12 19:49:43.0Z
Eddy Soeparmin Posted on 2009-03-09 20:48:27.0Z
Reply-To: "Eddy Soeparmin" <SoeparminE@MDAInc.co>
From: "Eddy Soeparmin" <SoeparminE@MDAInc.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: What event to trap this grid pointer?
Lines: 391
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
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: <49b5809b@forums-1-dub>
Date: 9 Mar 2009 12:48:27 -0800
X-Trace: forums-1-dub 1236631707 10.22.241.152 (9 Mar 2009 12:48:27 -0800)
X-Original-Trace: 9 Mar 2009 12:48:27 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88931
Article PK: 418183

Hi,

I'm trying to implement a function / service for Grid presentation style to
expand its width to the maximum of its data when doubleclicking on the label
border between 2 columns. I need to know what's the event name to map / trap
or if someone has implemented it before? This is similar to Windows Explorer
when doubleclicking on it.

Basically when mouse over this border, PB or Windows Explorer changes the
mouse pointer to sort of like straight bar and SizeWE! I need to trap this
event so I can add code to expand the column width for its max data.

Please look at the attachment and let me know.

Thanks.

PB 11.5 (3127)
XP - SP3

-------
Eddy Soeparmin

Grid Separator.JPG

Dave Hauze Posted on 2009-03-10 16:23:49.0Z
From: "Dave Hauze" <david.hauze@steeldynamics.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <49b5809b@forums-1-dub>
Subject: Re: What event to trap this grid pointer?
Lines: 49
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <49b69415$1@forums-1-dub>
Date: 10 Mar 2009 08:23:49 -0800
X-Trace: forums-1-dub 1236702229 10.22.241.152 (10 Mar 2009 08:23:49 -0800)
X-Original-Trace: 10 Mar 2009 08:23:49 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88935
Article PK: 418187

I don't believe there is an event in PB for this. First off, when you
doubleclick that, you are going to fire the DoubleClicked event. You will
probably have to put some logic in there to handle this. A couple of things
to look for are whether the row variable is 0 or not, whether the dwo.name
has the expected information or not (for instance, it just said "datawindow"
when I doubleclicked on the space between grid items (whereas if you had
clicked on an object it would have given you its name). So you can look for
the signs that they've clicked in the grid area, and then process that. You
can take the X/Y positions to determine where in the DW you are, find out
the size of the datawindow object, determine the max data length in the
column, and go from there. Yes, probably a lot of work. Conversely, you may
be able to find an external event for this. It may involve the Windows API
MouseMove, SetCapture, ReleaseCapture functions in order to capture the
mouse, do your processing, and then release it. The Windows API may also
have the function you are looking for to expand a grid column.

Of course I could be wrong on PB having something, I've just never run
across it.

--
Dave Hauze

"Eddy Soeparmin" <SoeparminE@MDAInc.com> wrote in message
news:49b5809b@forums-1-dub...
> Hi,
>
> I'm trying to implement a function / service for Grid presentation style
> to expand its width to the maximum of its data when doubleclicking on the
> label border between 2 columns. I need to know what's the event name to
> map / trap or if someone has implemented it before? This is similar to
> Windows Explorer when doubleclicking on it.
>
> Basically when mouse over this border, PB or Windows Explorer changes the
> mouse pointer to sort of like straight bar and SizeWE! I need to trap this
> event so I can add code to expand the column width for its max data.
>
> Please look at the attachment and let me know.
>
> Thanks.
>
> PB 11.5 (3127)
> XP - SP3
>
> -------
> Eddy Soeparmin
>
>


Eddy Soeparmin Posted on 2009-03-10 17:47:33.0Z
Reply-To: "Eddy Soeparmin" <SoeparminE@MDAInc.co>
From: "Eddy Soeparmin" <SoeparminE@MDAInc.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <49b5809b@forums-1-dub> <49b69415$1@forums-1-dub>
Subject: Re: What event to trap this grid pointer?
Lines: 68
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <49b6a7b5@forums-1-dub>
Date: 10 Mar 2009 09:47:33 -0800
X-Trace: forums-1-dub 1236707253 10.22.241.152 (10 Mar 2009 09:47:33 -0800)
X-Original-Trace: 10 Mar 2009 09:47:33 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88937
Article PK: 418188

Hi Dave,

I did a little bit of testing yesterday using the DoubleClicked() before I
posted a new thread here. But the end result does not please me and I'd like
to look for a new and better way to handle it. Once this state passed, to
size the column width is not too challenging. I can extract some code out
from Roland Smith's dwGridXP to size the column to its max. Maybe this is
the only way...

Thanks.

--
Eddy Soeparmin

"Dave Hauze" <david.hauze@steeldynamics.com> wrote in message
news:49b69415$1@forums-1-dub...
>I don't believe there is an event in PB for this. First off, when you
>doubleclick that, you are going to fire the DoubleClicked event. You will
>probably have to put some logic in there to handle this. A couple of things
>to look for are whether the row variable is 0 or not, whether the dwo.name
>has the expected information or not (for instance, it just said
>"datawindow" when I doubleclicked on the space between grid items (whereas
>if you had clicked on an object it would have given you its name). So you
>can look for the signs that they've clicked in the grid area, and then
>process that. You can take the X/Y positions to determine where in the DW
>you are, find out the size of the datawindow object, determine the max data
>length in the column, and go from there. Yes, probably a lot of work.
>Conversely, you may be able to find an external event for this. It may
>involve the Windows API MouseMove, SetCapture, ReleaseCapture functions in
>order to capture the mouse, do your processing, and then release it. The
>Windows API may also have the function you are looking for to expand a grid
>column.
>
> Of course I could be wrong on PB having something, I've just never run
> across it.
>
> --
> Dave Hauze
>
> "Eddy Soeparmin" <SoeparminE@MDAInc.com> wrote in message
> news:49b5809b@forums-1-dub...
>> Hi,
>>
>> I'm trying to implement a function / service for Grid presentation style
>> to expand its width to the maximum of its data when doubleclicking on the
>> label border between 2 columns. I need to know what's the event name to
>> map / trap or if someone has implemented it before? This is similar to
>> Windows Explorer when doubleclicking on it.
>>
>> Basically when mouse over this border, PB or Windows Explorer changes the
>> mouse pointer to sort of like straight bar and SizeWE! I need to trap
>> this event so I can add code to expand the column width for its max data.
>>
>> Please look at the attachment and let me know.
>>
>> Thanks.
>>
>> PB 11.5 (3127)
>> XP - SP3
>>
>> -------
>> Eddy Soeparmin
>>
>>
>
>


Philip Salgannik Posted on 2009-03-12 17:36:31.0Z
From: "Philip Salgannik" <philip@MeMyselfAndI.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <49b5809b@forums-1-dub> <49b69415$1@forums-1-dub> <49b6a7b5@forums-1-dub>
Subject: Re: What event to trap this grid pointer?
Lines: 287
Organization: MeMyselfAndI
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Response
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: <49b9481f$1@forums-1-dub>
Date: 12 Mar 2009 09:36:31 -0800
X-Trace: forums-1-dub 1236879391 10.22.241.152 (12 Mar 2009 09:36:31 -0800)
X-Original-Trace: 12 Mar 2009 09:36:31 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88953
Article PK: 418210

You need some proximity hit-testing, take a look at the attached

"Eddy Soeparmin" <SoeparminE@MDAInc.com> wrote in message
news:49b6a7b5@forums-1-dub...
> Hi Dave,
>
> I did a little bit of testing yesterday using the DoubleClicked() before I
> posted a new thread here. But the end result does not please me and I'd
> like
> to look for a new and better way to handle it. Once this state passed, to
> size the column width is not too challenging. I can extract some code out
> from Roland Smith's dwGridXP to size the column to its max. Maybe this is
> the only way...
>
> Thanks.
>
> --
> Eddy Soeparmin
>
> "Dave Hauze" <david.hauze@steeldynamics.com> wrote in message
> news:49b69415$1@forums-1-dub...
>>I don't believe there is an event in PB for this. First off, when you
>>doubleclick that, you are going to fire the DoubleClicked event. You will
>>probably have to put some logic in there to handle this. A couple of
>>things
>>to look for are whether the row variable is 0 or not, whether the dwo.name
>>has the expected information or not (for instance, it just said
>>"datawindow" when I doubleclicked on the space between grid items (whereas
>>if you had clicked on an object it would have given you its name). So you
>>can look for the signs that they've clicked in the grid area, and then
>>process that. You can take the X/Y positions to determine where in the DW
>>you are, find out the size of the datawindow object, determine the max
>>data
>>length in the column, and go from there. Yes, probably a lot of work.
>>Conversely, you may be able to find an external event for this. It may
>>involve the Windows API MouseMove, SetCapture, ReleaseCapture functions in
>>order to capture the mouse, do your processing, and then release it. The
>>Windows API may also have the function you are looking for to expand a
>>grid
>>column.
>>
>> Of course I could be wrong on PB having something, I've just never run
>> across it.
>>
>> --
>> Dave Hauze
>>
>> "Eddy Soeparmin" <SoeparminE@MDAInc.com> wrote in message
>> news:49b5809b@forums-1-dub...
>>> Hi,
>>>
>>> I'm trying to implement a function / service for Grid presentation style
>>> to expand its width to the maximum of its data when doubleclicking on
>>> the
>>> label border between 2 columns. I need to know what's the event name to
>>> map / trap or if someone has implemented it before? This is similar to
>>> Windows Explorer when doubleclicking on it.
>>>
>>> Basically when mouse over this border, PB or Windows Explorer changes
>>> the
>>> mouse pointer to sort of like straight bar and SizeWE! I need to trap
>>> this event so I can add code to expand the column width for its max
>>> data.
>>>
>>> Please look at the attachment and let me know.
>>>
>>> Thanks.
>>>
>>> PB 11.5 (3127)
>>> XP - SP3
>>>
>>> -------
>>> Eddy Soeparmin
>>>
>>>
>>
>>
>
>
>


Eddy Soeparmin Posted on 2009-03-12 19:49:43.0Z
Reply-To: "Eddy Soeparmin" <SoeparminE@MDAInc.co>
From: "Eddy Soeparmin" <SoeparminE@MDAInc.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <49b5809b@forums-1-dub> <49b69415$1@forums-1-dub> <49b6a7b5@forums-1-dub> <49b9481f$1@forums-1-dub>
Subject: Re: What event to trap this grid pointer?
Lines: 100
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Response
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: <49b96757$1@forums-1-dub>
Date: 12 Mar 2009 11:49:43 -0800
X-Trace: forums-1-dub 1236887383 10.22.241.152 (12 Mar 2009 11:49:43 -0800)
X-Original-Trace: 12 Mar 2009 11:49:43 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88955
Article PK: 418206

Sweet. I've merged the code from Roland and Philip and my quick and dirty
test seems to work. I need to polish them.

Thanks Roland Smith and Philip Salgannik.

--
Eddy Soeparmin

"Philip Salgannik" <philip@MeMyselfAndI.com> wrote in message
news:49b9481f$1@forums-1-dub...
> You need some proximity hit-testing, take a look at the attached
>
> "Eddy Soeparmin" <SoeparminE@MDAInc.com> wrote in message
> news:49b6a7b5@forums-1-dub...
>> Hi Dave,
>>
>> I did a little bit of testing yesterday using the DoubleClicked() before
>> I
>> posted a new thread here. But the end result does not please me and I'd
>> like
>> to look for a new and better way to handle it. Once this state passed, to
>> size the column width is not too challenging. I can extract some code out
>> from Roland Smith's dwGridXP to size the column to its max. Maybe this is
>> the only way...
>>
>> Thanks.
>>
>> --
>> Eddy Soeparmin
>>
>> "Dave Hauze" <david.hauze@steeldynamics.com> wrote in message
>> news:49b69415$1@forums-1-dub...
>>>I don't believe there is an event in PB for this. First off, when you
>>>doubleclick that, you are going to fire the DoubleClicked event. You will
>>>probably have to put some logic in there to handle this. A couple of
>>>things
>>>to look for are whether the row variable is 0 or not, whether the
>>>dwo.name
>>>has the expected information or not (for instance, it just said
>>>"datawindow" when I doubleclicked on the space between grid items
>>>(whereas
>>>if you had clicked on an object it would have given you its name). So you
>>>can look for the signs that they've clicked in the grid area, and then
>>>process that. You can take the X/Y positions to determine where in the DW
>>>you are, find out the size of the datawindow object, determine the max
>>>data
>>>length in the column, and go from there. Yes, probably a lot of work.
>>>Conversely, you may be able to find an external event for this. It may
>>>involve the Windows API MouseMove, SetCapture, ReleaseCapture functions
>>>in
>>>order to capture the mouse, do your processing, and then release it. The
>>>Windows API may also have the function you are looking for to expand a
>>>grid
>>>column.
>>>
>>> Of course I could be wrong on PB having something, I've just never run
>>> across it.
>>>
>>> --
>>> Dave Hauze
>>>
>>> "Eddy Soeparmin" <SoeparminE@MDAInc.com> wrote in message
>>> news:49b5809b@forums-1-dub...
>>>> Hi,
>>>>
>>>> I'm trying to implement a function / service for Grid presentation
>>>> style
>>>> to expand its width to the maximum of its data when doubleclicking on
>>>> the
>>>> label border between 2 columns. I need to know what's the event name to
>>>> map / trap or if someone has implemented it before? This is similar to
>>>> Windows Explorer when doubleclicking on it.
>>>>
>>>> Basically when mouse over this border, PB or Windows Explorer changes
>>>> the
>>>> mouse pointer to sort of like straight bar and SizeWE! I need to trap
>>>> this event so I can add code to expand the column width for its max
>>>> data.
>>>>
>>>> Please look at the attachment and let me know.
>>>>
>>>> Thanks.
>>>>
>>>> PB 11.5 (3127)
>>>> XP - SP3
>>>>
>>>> -------
>>>> Eddy Soeparmin
>>>>
>>>>
>>>
>>>
>>
>>
>>
>
>
>