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 get button name

7 posts in DataWindow .NET Last posting was on 2004-11-18 03:14:29.0Z
Sam.Kee Posted on 2004-11-16 08:47:28.0Z
From: "Sam.Kee" <joinkee@hotmail.com>
Newsgroups: sybase.public.datawindow.net
Subject: How can get button name
Lines: 18
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
NNTP-Posting-Host: 218.18.128.104
X-Original-NNTP-Posting-Host: 218.18.128.104
Message-ID: <4199bea0@forums-1-dub>
Date: 16 Nov 2004 00:47:28 -0800
X-Trace: forums-1-dub 1100594848 218.18.128.104 (16 Nov 2004 00:47:28 -0800)
X-Original-Trace: 16 Nov 2004 00:47:28 -0800, 218.18.128.104
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:728
Article PK: 125156

Hi all

I have two button in the datawindow
how i can get button name in buttonclicked event which i clicked

my code
========
Private Sub dw_Master_ButtonClicked(ByVal sender As Object, ByVal e As
Sybase.DataWindow.ButtonClickedEventArgs) Handles dw_Master.ButtonClicked

here, i want get which button clicked
========================

End Sub

thanks for help


Sam.Kee Posted on 2004-11-16 09:49:20.0Z
From: "Sam.Kee" <joinkee@hotmail.com>
Newsgroups: sybase.public.datawindow.net
References: <4199bea0@forums-1-dub>
Subject: Re: How can get button name
Lines: 37
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
NNTP-Posting-Host: 218.18.128.104
X-Original-NNTP-Posting-Host: 218.18.128.104
Message-ID: <4199cd20@forums-1-dub>
Date: 16 Nov 2004 01:49:20 -0800
X-Trace: forums-1-dub 1100598560 218.18.128.104 (16 Nov 2004 01:49:20 -0800)
X-Original-Trace: 16 Nov 2004 01:49:20 -0800, 218.18.128.104
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:729
Article PK: 125155

I think this code can help me , but i think this way is not better
the code

Dim a As Sybase.DataWindow.ObjectAtPointer
Dim b As Sybase.DataWindow.GraphicObject
a = dw_Master.ObjectUnderMouse
b = a.Gob
MsgBox(b.Name)

anybody have other way get the button name?
Sam
2004-11-16
joinkee@hotmail.com

"Sam.Kee" <joinkee@hotmail.com> wrote in message
news:4199bea0@forums-1-dub...
> Hi all
>
> I have two button in the datawindow
> how i can get button name in buttonclicked event which i clicked
>
> my code
> ========
> Private Sub dw_Master_ButtonClicked(ByVal sender As Object, ByVal e As
> Sybase.DataWindow.ButtonClickedEventArgs) Handles dw_Master.ButtonClicked
>
> here, i want get which button clicked
> ========================
>
> End Sub
>
> thanks for help
>
>


dfish Posted on 2004-11-16 10:07:42.0Z
From: dfish@_no_spam_sybase.com (Dave Fish [Team Sybase])
Newsgroups: sybase.public.datawindow.net
Subject: Re: How can get button name
Organization: Sybase Professional Services
Reply-To: nospam_dfish@sybase.com_nospam
Message-ID: <4199d059.6718821@forums.sybase.com>
References: <4199bea0@forums-1-dub>
X-Newsreader: Forte Free Agent 1.21/32.243
NNTP-Posting-Host: dfishxp.sybase.com
X-Original-NNTP-Posting-Host: dfishxp.sybase.com
Date: 16 Nov 2004 02:07:42 -0800
X-Trace: forums-1-dub 1100599662 158.76.235.36 (16 Nov 2004 02:07:42 -0800)
X-Original-Trace: 16 Nov 2004 02:07:42 -0800, dfishxp.sybase.com
Lines: 38
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:730
Article PK: 125159

You need to use the ObjectUnderMouse.Gob.Name property. Something like
this in Visual Basic .NET:

Dim buttonName As String
buttonName = sender.ObjectUnderMouse.Gob.Name
MsgBox(buttonName)

Regards,
Dave Fish
Sybase

TeamSybase blogs: http://www.teamsybase.net/blogs

DataWindow.NET code examples available on CodeXchange:
http://datawindownet.codexchange.sybase.com

DataWindowControl1.ObjectUnderMouse.Gob.Name

On 16 Nov 2004 00:47:28 -0800, "Sam.Kee" <joinkee@hotmail.com> wrote:

>Hi all
>
>I have two button in the datawindow
>how i can get button name in buttonclicked event which i clicked
>
>my code
>========
> Private Sub dw_Master_ButtonClicked(ByVal sender As Object, ByVal e As
>Sybase.DataWindow.ButtonClickedEventArgs) Handles dw_Master.ButtonClicked
>
> here, i want get which button clicked
> ========================
>
> End Sub
>
>thanks for help
>
>


Sam.Kee Posted on 2004-11-17 01:31:16.0Z
From: "Sam.Kee" <joinkee@hotmail.com>
Newsgroups: sybase.public.datawindow.net
References: <4199bea0@forums-1-dub> <4199d059.6718821@forums.sybase.com>
Subject: Re: How can get button name
Lines: 60
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: 218.18.29.8
Message-ID: <419aa9e0@forums-2-dub>
X-Original-Trace: 16 Nov 2004 17:31:12 -0800, 218.18.29.8
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 16 Nov 2004 17:31:13 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 16 Nov 2004 17:31:16 -0800
X-Trace: forums-1-dub 1100655076 10.22.108.75 (16 Nov 2004 17:31:16 -0800)
X-Original-Trace: 16 Nov 2004 17:31:16 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:736
Article PK: 125165

Hi Dave Fish

Thanks for answer my question

But, when i clicked the button and immediately move the mouse under other
control near the button, in this time i get a wrong name, the name isn't
botton's name

In PowerBuilder, I can script for buttonclicked and using dwo object to get
button name
In Datawindow.net have other way to get the button name ?

Sam
2004-11-17
joinkee@hotmail.com

"Dave Fish [Team Sybase]" <dfish@_no_spam_sybase.com> wrote in message
news:4199d059.6718821@forums.sybase.com...
> You need to use the ObjectUnderMouse.Gob.Name property. Something like
> this in Visual Basic .NET:
>
> Dim buttonName As String
> buttonName = sender.ObjectUnderMouse.Gob.Name
> MsgBox(buttonName)
>
> Regards,
> Dave Fish
> Sybase
>
> TeamSybase blogs: http://www.teamsybase.net/blogs
>
> DataWindow.NET code examples available on CodeXchange:
> http://datawindownet.codexchange.sybase.com
>
> DataWindowControl1.ObjectUnderMouse.Gob.Name
> On 16 Nov 2004 00:47:28 -0800, "Sam.Kee" <joinkee@hotmail.com> wrote:
>
> >Hi all
> >
> >I have two button in the datawindow
> >how i can get button name in buttonclicked event which i clicked
> >
> >my code
> >========
> > Private Sub dw_Master_ButtonClicked(ByVal sender As Object, ByVal e
As
> >Sybase.DataWindow.ButtonClickedEventArgs) Handles dw_Master.ButtonClicked
> >
> > here, i want get which button clicked
> > ========================
> >
> > End Sub
> >
> >thanks for help
> >
> >
>


Jim O'Neil [Sybase] Posted on 2004-11-17 13:54:22.0Z
From: "Jim O'Neil [Sybase]" <joneil_at_sybase_dot_com>
Newsgroups: sybase.public.datawindow.net
Subject: Re: How can get button name
Message-ID: <pulmp05enb5trmtntgp1bg5d4lha7km0an@4ax.com>
References: <4199bea0@forums-1-dub> <4199d059.6718821@forums.sybase.com> <419aa9e0@forums-2-dub>
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: joneilw2k.sybase.com
X-Original-NNTP-Posting-Host: joneilw2k.sybase.com
Date: 17 Nov 2004 05:54:22 -0800
X-Trace: forums-1-dub 1100699662 10.18.43.140 (17 Nov 2004 05:54:22 -0800)
X-Original-Trace: 17 Nov 2004 05:54:22 -0800, joneilw2k.sybase.com
Lines: 66
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:739
Article PK: 125167

The ObjectUnderMouse property is continually changing when you move
the mouse, so depending upon how you coded this, I could see this
happening. What does your Clicked even code look like?

On 16 Nov 2004 17:31:16 -0800, "Sam.Kee" <joinkee@hotmail.com> wrote:

>Hi Dave Fish
>
>Thanks for answer my question
>
>But, when i clicked the button and immediately move the mouse under other
>control near the button, in this time i get a wrong name, the name isn't
>botton's name
>
>In PowerBuilder, I can script for buttonclicked and using dwo object to get
>button name
>In Datawindow.net have other way to get the button name ?
>
>Sam
>2004-11-17
>joinkee@hotmail.com
>
>
>"Dave Fish [Team Sybase]" <dfish@_no_spam_sybase.com> wrote in message
>news:4199d059.6718821@forums.sybase.com...
>> You need to use the ObjectUnderMouse.Gob.Name property. Something like
>> this in Visual Basic .NET:
>>
>> Dim buttonName As String
>> buttonName = sender.ObjectUnderMouse.Gob.Name
>> MsgBox(buttonName)
>>
>> Regards,
>> Dave Fish
>> Sybase
>>
>> TeamSybase blogs: http://www.teamsybase.net/blogs
>>
>> DataWindow.NET code examples available on CodeXchange:
>> http://datawindownet.codexchange.sybase.com
>>
>> DataWindowControl1.ObjectUnderMouse.Gob.Name
>> On 16 Nov 2004 00:47:28 -0800, "Sam.Kee" <joinkee@hotmail.com> wrote:
>>
>> >Hi all
>> >
>> >I have two button in the datawindow
>> >how i can get button name in buttonclicked event which i clicked
>> >
>> >my code
>> >========
>> > Private Sub dw_Master_ButtonClicked(ByVal sender As Object, ByVal e
>As
>> >Sybase.DataWindow.ButtonClickedEventArgs) Handles dw_Master.ButtonClicked
>> >
>> > here, i want get which button clicked
>> > ========================
>> >
>> > End Sub
>> >
>> >thanks for help
>> >
>> >
>>
>


Sam.Kee Posted on 2004-11-18 01:14:52.0Z
From: "Sam.Kee" <joinkee@hotmail.com>
Newsgroups: sybase.public.datawindow.net
References: <4199bea0@forums-1-dub> <4199d059.6718821@forums.sybase.com> <419aa9e0@forums-2-dub> <pulmp05enb5trmtntgp1bg5d4lha7km0an@4ax.com>
Subject: Re: How can get button name
Lines: 92
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
NNTP-Posting-Host: 218.17.64.14
X-Original-NNTP-Posting-Host: 218.17.64.14
Message-ID: <419bf78c@forums-1-dub>
Date: 17 Nov 2004 17:14:52 -0800
X-Trace: forums-1-dub 1100740492 218.17.64.14 (17 Nov 2004 17:14:52 -0800)
X-Original-Trace: 17 Nov 2004 17:14:52 -0800, 218.17.64.14
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:752
Article PK: 125179

Thanks Jim O'Neil for anwser my question

This is my code

Private Sub dw_Master_ButtonClicked(ByVal sender As Object, ByVal e As
Sybase.DataWindow.ButtonClickedEventArgs) Handles dw_Master.ButtonClicked
MsgBox(sender.ObjectUnderMouse.Gob.Name)
End Sub

in datawindow, i have a edit box near my button, when i clicked button and
immediately move the mouse on the editbox, in the event script report the
edit box name , isn't button name
I try more time for happen get wrong name, just 1 time get wrong name

Sam
2004-11-18

"Jim O'Neil [Sybase]" <joneil_at_sybase_dot_com> wrote in message
news:pulmp05enb5trmtntgp1bg5d4lha7km0an@4ax.com...
> The ObjectUnderMouse property is continually changing when you move
> the mouse, so depending upon how you coded this, I could see this
> happening. What does your Clicked even code look like?
>
> On 16 Nov 2004 17:31:16 -0800, "Sam.Kee" <joinkee@hotmail.com> wrote:
>
> >Hi Dave Fish
> >
> >Thanks for answer my question
> >
> >But, when i clicked the button and immediately move the mouse under other
> >control near the button, in this time i get a wrong name, the name isn't
> >botton's name
> >
> >In PowerBuilder, I can script for buttonclicked and using dwo object to
get
> >button name
> >In Datawindow.net have other way to get the button name ?
> >
> >Sam
> >2004-11-17
> >joinkee@hotmail.com
> >
> >
> >"Dave Fish [Team Sybase]" <dfish@_no_spam_sybase.com> wrote in message
> >news:4199d059.6718821@forums.sybase.com...
> >> You need to use the ObjectUnderMouse.Gob.Name property. Something like
> >> this in Visual Basic .NET:
> >>
> >> Dim buttonName As String
> >> buttonName = sender.ObjectUnderMouse.Gob.Name
> >> MsgBox(buttonName)
> >>
> >> Regards,
> >> Dave Fish
> >> Sybase
> >>
> >> TeamSybase blogs: http://www.teamsybase.net/blogs
> >>
> >> DataWindow.NET code examples available on CodeXchange:
> >> http://datawindownet.codexchange.sybase.com
> >>
> >> DataWindowControl1.ObjectUnderMouse.Gob.Name
> >> On 16 Nov 2004 00:47:28 -0800, "Sam.Kee" <joinkee@hotmail.com> wrote:
> >>
> >> >Hi all
> >> >
> >> >I have two button in the datawindow
> >> >how i can get button name in buttonclicked event which i clicked
> >> >
> >> >my code
> >> >========
> >> > Private Sub dw_Master_ButtonClicked(ByVal sender As Object, ByVal
e
> >As
> >> >Sybase.DataWindow.ButtonClickedEventArgs) Handles
dw_Master.ButtonClicked
> >> >
> >> > here, i want get which button clicked
> >> > ========================
> >> >
> >> > End Sub
> >> >
> >> >thanks for help
> >> >
> >> >
> >>
> >
>


Jim O'Neil [Sybase] Posted on 2004-11-18 03:14:29.0Z
From: "Jim O'Neil [Sybase]" <joneil_at_sybase_dot_com>
Newsgroups: sybase.public.datawindow.net
Subject: Re: How can get button name
Message-ID: <7l4op098en3fgf1mpv2thkl2ghqltalrd3@4ax.com>
References: <4199bea0@forums-1-dub> <4199d059.6718821@forums.sybase.com> <419aa9e0@forums-2-dub> <pulmp05enb5trmtntgp1bg5d4lha7km0an@4ax.com> <419bf78c@forums-1-dub>
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: vpn-concord-112.sybase.com
X-Original-NNTP-Posting-Host: vpn-concord-112.sybase.com
Date: 17 Nov 2004 19:14:29 -0800
X-Trace: forums-1-dub 1100747669 158.159.8.112 (17 Nov 2004 19:14:29 -0800)
X-Original-Trace: 17 Nov 2004 19:14:29 -0800, vpn-concord-112.sybase.com
Lines: 105
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:753
Article PK: 125181

well, what you are describing is conceivable, because of timing. In
general, I would recommend saving the Gob information in a local
variable as the first line of your event script and then passing that
variable into additional methods. In this case, Windows is able to
process the message queue (and thus recognize the movement of the
mouse) in the time it takes to assemble the call to MsgBox. In
PowerBuilder, it's a little different because the dwo is an argument
to the event. Even with the change I mention, though it's still going
to be possible that it will be 'wrong' and that's something that may
warrant some thought on our end.

On 17 Nov 2004 17:14:52 -0800, "Sam.Kee" <joinkee@hotmail.com> wrote:

>
>Thanks Jim O'Neil for anwser my question
>
>This is my code
>
>Private Sub dw_Master_ButtonClicked(ByVal sender As Object, ByVal e As
>Sybase.DataWindow.ButtonClickedEventArgs) Handles dw_Master.ButtonClicked
> MsgBox(sender.ObjectUnderMouse.Gob.Name)
>End Sub
>
>in datawindow, i have a edit box near my button, when i clicked button and
>immediately move the mouse on the editbox, in the event script report the
>edit box name , isn't button name
>I try more time for happen get wrong name, just 1 time get wrong name
>
>Sam
>2004-11-18
>
>
>"Jim O'Neil [Sybase]" <joneil_at_sybase_dot_com> wrote in message
>news:pulmp05enb5trmtntgp1bg5d4lha7km0an@4ax.com...
>> The ObjectUnderMouse property is continually changing when you move
>> the mouse, so depending upon how you coded this, I could see this
>> happening. What does your Clicked even code look like?
>>
>> On 16 Nov 2004 17:31:16 -0800, "Sam.Kee" <joinkee@hotmail.com> wrote:
>>
>> >Hi Dave Fish
>> >
>> >Thanks for answer my question
>> >
>> >But, when i clicked the button and immediately move the mouse under other
>> >control near the button, in this time i get a wrong name, the name isn't
>> >botton's name
>> >
>> >In PowerBuilder, I can script for buttonclicked and using dwo object to
>get
>> >button name
>> >In Datawindow.net have other way to get the button name ?
>> >
>> >Sam
>> >2004-11-17
>> >joinkee@hotmail.com
>> >
>> >
>> >"Dave Fish [Team Sybase]" <dfish@_no_spam_sybase.com> wrote in message
>> >news:4199d059.6718821@forums.sybase.com...
>> >> You need to use the ObjectUnderMouse.Gob.Name property. Something like
>> >> this in Visual Basic .NET:
>> >>
>> >> Dim buttonName As String
>> >> buttonName = sender.ObjectUnderMouse.Gob.Name
>> >> MsgBox(buttonName)
>> >>
>> >> Regards,
>> >> Dave Fish
>> >> Sybase
>> >>
>> >> TeamSybase blogs: http://www.teamsybase.net/blogs
>> >>
>> >> DataWindow.NET code examples available on CodeXchange:
>> >> http://datawindownet.codexchange.sybase.com
>> >>
>> >> DataWindowControl1.ObjectUnderMouse.Gob.Name
>> >> On 16 Nov 2004 00:47:28 -0800, "Sam.Kee" <joinkee@hotmail.com> wrote:
>> >>
>> >> >Hi all
>> >> >
>> >> >I have two button in the datawindow
>> >> >how i can get button name in buttonclicked event which i clicked
>> >> >
>> >> >my code
>> >> >========
>> >> > Private Sub dw_Master_ButtonClicked(ByVal sender As Object, ByVal
>e
>> >As
>> >> >Sybase.DataWindow.ButtonClickedEventArgs) Handles
>dw_Master.ButtonClicked
>> >> >
>> >> > here, i want get which button clicked
>> >> > ========================
>> >> >
>> >> > End Sub
>> >> >
>> >> >thanks for help
>> >> >
>> >> >
>> >>
>> >
>>
>