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.

Issue getting dwo on click event

4 posts in DataWindow .NET Last posting was on 2004-11-08 15:20:00.0Z
Oren Tavory Posted on 2004-11-04 17:35:25.0Z
From: tester20032000@yahoo.com (Oren Tavory)
Newsgroups: sybase.public.datawindow.net
Subject: Issue getting dwo on click event
Organization: Vistar Technologies Inc
Reply-To: tester20032000@yahoo.com
Message-ID: <418a6525.182003500@forums.sybase.com>
X-Newsreader: Forte Free Agent 1.11/32.235
NNTP-Posting-Host: adsl-2-92-144.mia.bellsouth.net
X-Original-NNTP-Posting-Host: adsl-2-92-144.mia.bellsouth.net
Date: 4 Nov 2004 09:35:25 -0800
X-Trace: forums-1-dub 1099589725 65.2.92.144 (4 Nov 2004 09:35:25 -0800)
X-Original-Trace: 4 Nov 2004 09:35:25 -0800, adsl-2-92-144.mia.bellsouth.net
Lines: 27
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:664
Article PK: 125091

Hi Everyone:

Trying to get the correct name of the control(column or text) the
user clicked on, ie did the user click on a column with a tabsequence
of 0 or did he click on a column header. Found previous post about
objectundermouse, however it seemed to returned the first control not
the control the user clicked on. I am sure there has got to be a way
to do this,but i must be missing something.

Private Sub dw1_Click(ByVal sender As Object,ByVal e As
System.EventArgs) Handles dw1.click

Dim dwo as Sybase.Datawindow.GraphicObjectText
Dim sStr As String

dwo = dw1.ObjectUnderMouse.Gob()
sStr = dwo.name.ToString

End Sub

Some help would be greately appreciated.

TIA.

Oren Tavory
Vistar


David Avera Posted on 2004-11-05 19:04:10.0Z
From: "David Avera" <davera@sybase.com>
Newsgroups: sybase.public.datawindow.net
References: <418a6525.182003500@forums.sybase.com>
Subject: Re: Issue getting dwo on click event
Lines: 43
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
X-Original-NNTP-Posting-Host: adsl-068-209-228-042.sip.mgm.bellsouth.net
Message-ID: <418bcea6@forums-2-dub>
X-Original-Trace: 5 Nov 2004 11:04:06 -0800, adsl-068-209-228-042.sip.mgm.bellsouth.net
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 5 Nov 2004 11:04:07 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 5 Nov 2004 11:04:10 -0800
X-Trace: forums-1-dub 1099681450 10.22.108.75 (5 Nov 2004 11:04:10 -0800)
X-Original-Trace: 5 Nov 2004 11:04:10 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:667
Article PK: 125093

The code you list should get you the name of the text object, what are you
getting?
If you need to determine what kind of object was clicked on you can do the
following (this is in C# so translate it to VB)

GraphicObject gob = dw_1.ObjectUnderMouse;
if ( gob is GraphicObjectText )
GraphicObjectText gobText = (GraphicObjectText) gob;
else if ( gob is (GraphicObjectColumn)
GraphicObjectColumn gobColumn = (GraphicObjectColumn) gob;
...
and so on.

"Oren Tavory" <tester20032000@yahoo.com> wrote in message
news:418a6525.182003500@forums.sybase.com...
> Hi Everyone:
>
> Trying to get the correct name of the control(column or text) the
> user clicked on, ie did the user click on a column with a tabsequence
> of 0 or did he click on a column header. Found previous post about
> objectundermouse, however it seemed to returned the first control not
> the control the user clicked on. I am sure there has got to be a way
> to do this,but i must be missing something.
>
> Private Sub dw1_Click(ByVal sender As Object,ByVal e As
> System.EventArgs) Handles dw1.click
>
> Dim dwo as Sybase.Datawindow.GraphicObjectText
> Dim sStr As String
>
> dwo = dw1.ObjectUnderMouse.Gob()
> sStr = dwo.name.ToString
>
> End Sub
>
> Some help would be greately appreciated.
>
> TIA.
>
> Oren Tavory
> Vistar
>


Jim O'Neil [Sybase] Posted on 2004-11-04 23:27:10.0Z
From: "Jim O'Neil [Sybase]" <joneil_at_sybase_dot_com>
Newsgroups: sybase.public.datawindow.net
Subject: Re: Issue getting dwo on click event
Message-ID: <shelo01qopu819i42o2l899730gfdue9t7@4ax.com>
References: <418a6525.182003500@forums.sybase.com>
X-Newsreader: Forte Agent 2.0/32.652
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: surfec007.sybase.com
X-Original-NNTP-Posting-Host: surfec007.sybase.com
Date: 4 Nov 2004 15:27:10 -0800
X-Trace: forums-1-dub 1099610830 199.93.176.7 (4 Nov 2004 15:27:10 -0800)
X-Original-Trace: 4 Nov 2004 15:27:10 -0800, surfec007.sybase.com
Lines: 38
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:666
Article PK: 125096

Well, you're close, but if you don't know whether it's a column or a
header, you can't have dwo be GraphicObjecText or you'll get an
exception when you click on a column. Define dwo as GraphicObject and
then test what kind of graphic object it is. That said though, it
doesn't sound like you're really running into that specifically. What
do you mean by 'first' control? I've used this techinque quite a bit
and haven't seen this type of behavior.

On 4 Nov 2004 09:35:25 -0800, tester20032000@yahoo.com (Oren Tavory)

wrote:

>Hi Everyone:
>
> Trying to get the correct name of the control(column or text) the
>user clicked on, ie did the user click on a column with a tabsequence
>of 0 or did he click on a column header. Found previous post about
>objectundermouse, however it seemed to returned the first control not
>the control the user clicked on. I am sure there has got to be a way
>to do this,but i must be missing something.
>
>Private Sub dw1_Click(ByVal sender As Object,ByVal e As
>System.EventArgs) Handles dw1.click
>
>Dim dwo as Sybase.Datawindow.GraphicObjectText
>Dim sStr As String
>
>dwo = dw1.ObjectUnderMouse.Gob()
>sStr = dwo.name.ToString
>
>End Sub
>
>Some help would be greately appreciated.
>
>TIA.
>
>Oren Tavory
>Vistar


Oren Tavory Posted on 2004-11-08 15:20:00.0Z
From: tester20032000@yahoo.com (Oren Tavory)
Newsgroups: sybase.public.datawindow.net
Subject: Re: Issue getting dwo on click event
Organization: Vistar Technologies Inc
Reply-To: tester20032000@yahoo.com
Message-ID: <418f8c19.114689453@forums.sybase.com>
References: <418a6525.182003500@forums.sybase.com> <shelo01qopu819i42o2l899730gfdue9t7@4ax.com>
X-Newsreader: Forte Free Agent 1.11/32.235
X-Original-NNTP-Posting-Host: adsl-2-92-144.mia.bellsouth.net
X-Original-Trace: 8 Nov 2004 07:19:55 -0800, adsl-2-92-144.mia.bellsouth.net
Lines: 55
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 8 Nov 2004 07:19:56 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 8 Nov 2004 07:20:00 -0800
X-Trace: forums-1-dub 1099927200 10.22.108.75 (8 Nov 2004 07:20:00 -0800)
X-Original-Trace: 8 Nov 2004 07:20:00 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:672
Article PK: 125095

Jim:

Thanks to your response we got it to work. FYI, it appears that by
using the debugger the objectatpointer and objectundermouse methods
look at the LAST DEBUGER click, not the LAST APPLICATION click, a
tricky one. when in the debugger and stepping through code the section
you must use the function keys. This newsgroup and the people who
contribute to it are great source of information when you are stuck.

Thanks

Oren

On 4 Nov 2004 15:27:10 -0800, "Jim O'Neil [Sybase]"

<joneil_at_sybase_dot_com> wrote:

>Well, you're close, but if you don't know whether it's a column or a
>header, you can't have dwo be GraphicObjecText or you'll get an
>exception when you click on a column. Define dwo as GraphicObject and
>then test what kind of graphic object it is. That said though, it
>doesn't sound like you're really running into that specifically. What
>do you mean by 'first' control? I've used this techinque quite a bit
>and haven't seen this type of behavior.
>
>On 4 Nov 2004 09:35:25 -0800, tester20032000@yahoo.com (Oren Tavory)
>wrote:
>
>>Hi Everyone:
>>
>> Trying to get the correct name of the control(column or text) the
>>user clicked on, ie did the user click on a column with a tabsequence
>>of 0 or did he click on a column header. Found previous post about
>>objectundermouse, however it seemed to returned the first control not
>>the control the user clicked on. I am sure there has got to be a way
>>to do this,but i must be missing something.
>>
>>Private Sub dw1_Click(ByVal sender As Object,ByVal e As
>>System.EventArgs) Handles dw1.click
>>
>>Dim dwo as Sybase.Datawindow.GraphicObjectText
>>Dim sStr As String
>>
>>dwo = dw1.ObjectUnderMouse.Gob()
>>sStr = dwo.name.ToString
>>
>>End Sub
>>
>>Some help would be greately appreciated.
>>
>>TIA.
>>
>>Oren Tavory
>>Vistar
>