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 information in clicked event

4 posts in DataWindow .NET Last posting was on 2004-12-09 22:56:45.0Z
DGerdner Posted on 2004-12-09 15:38:09.0Z
From: "DGerdner" <dave@ptax.org>
Newsgroups: sybase.public.datawindow.net
Subject: Getting information in clicked event
Lines: 19
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
X-Original-NNTP-Posting-Host: ool-4353a821.dyn.optonline.net
Message-ID: <41b8715c$1@forums-2-dub>
X-Original-Trace: 9 Dec 2004 07:38:04 -0800, ool-4353a821.dyn.optonline.net
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 9 Dec 2004 07:38:08 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 9 Dec 2004 07:38:09 -0800
X-Trace: forums-1-dub 1102606689 10.22.108.75 (9 Dec 2004 07:38:09 -0800)
X-Original-Trace: 9 Dec 2004 07:38:09 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:935
Article PK: 125363

I've seen other posts on this, but they are for VB while I'm using C# and I
cannot get them to work. I am creating a base u_dw (sort of like PFC).
Just starting with the following code I am not able to get dwo populated
correctly; the dwo= line genereates an error "An object reference is
required....". Any help would be appreciated.

private void u_dw_Click(object sender, System.EventArgs e)
{
Sybase.DataWindow.GraphicObjectText dwo;
String sColName;
dwo = u_dw.ObjectUnderMouse.Gob;
}

--
David L Gerdner
Next Generation Software, Inc.
201-571-0425


Jack Addington Posted on 2004-12-09 16:01:26.0Z
From: "Jack Addington" <jaddington@shaw.ca>
Newsgroups: sybase.public.datawindow.net
References: <41b8715c$1@forums-2-dub>
Subject: Re: Getting information in clicked event
Lines: 85
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: s010600e018e32f17.cg.shawcable.net
Message-ID: <41b876d2$1@forums-2-dub>
X-Original-Trace: 9 Dec 2004 08:01:22 -0800, s010600e018e32f17.cg.shawcable.net
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 9 Dec 2004 08:01:23 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 9 Dec 2004 08:01:26 -0800
X-Trace: forums-1-dub 1102608086 10.22.108.75 (9 Dec 2004 08:01:26 -0800)
X-Original-Trace: 9 Dec 2004 08:01:26 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:936
Article PK: 125361

Dave,

Not sure what you are trying to do exactly. but here is an example from my
clicked event

private void DWAnc_Click(object sender, System.EventArgs e)
{
int x,y;

Sybase.DataWindow.ObjectAtPointer obj = this.ObjectUnderMouse;
Sybase.DataWindow.GraphicObject dwo = obj.Gob;

if (obj.Gob.Empty)
{
x = DWAnc.MousePosition.X;
y = DWAnc.MousePosition.X;
}
else
{
x = dwo.X;
y = dwo.Y;
}

#region Menu Related
// moved to mouseDown event
// try
// {
// DataLogic.InitMenu(obj.RowNumber);
// }
// catch(Exception ex)
// {
// MessageBox.Show(ex.ToString(), "Error initializing menus");
// }
#endregion

#region Row Sort Manager
try
{
// call the sort manager
if (obj.Band.Type.ToString() == "Header")
if ( RowSortMgr != null) RowSortMgr.DWClicked(x, y, obj.RowNumber,
dwo);
}
catch(Exception ex)
{
MessageBox.Show(ex.ToString(),"RowSort Manager Error");
}
#endregion

#region Row Select Manager
try
{
// call the rowmanager
if ( RowSelectMgr != null) RowSelectMgr.DWClicked(x, y, obj.RowNumber,
dwo);
}
catch(Exception ex)
{
MessageBox.Show(ex.ToString(),"Row Select Manager Error");
}
#endregion

"DGerdner" <dave@ptax.org> wrote in message news:41b8715c$1@forums-2-dub...
> I've seen other posts on this, but they are for VB while I'm using C# and
> I
> cannot get them to work. I am creating a base u_dw (sort of like PFC).
> Just starting with the following code I am not able to get dwo populated
> correctly; the dwo= line genereates an error "An object reference is
> required....". Any help would be appreciated.
>
> private void u_dw_Click(object sender, System.EventArgs e)
> {
> Sybase.DataWindow.GraphicObjectText dwo;
> String sColName;
> dwo = u_dw.ObjectUnderMouse.Gob;
> }
>
> --
> David L Gerdner
> Next Generation Software, Inc.
> 201-571-0425
>
>


DGerdner Posted on 2004-12-09 16:51:26.0Z
From: "DGerdner" <dave@ptax.org>
Newsgroups: sybase.public.datawindow.net
References: <41b8715c$1@forums-2-dub> <41b876d2$1@forums-2-dub>
Subject: Re: Getting information in clicked event
Lines: 96
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
X-Original-NNTP-Posting-Host: ool-4353a821.dyn.optonline.net
Message-ID: <41b88289$1@forums-2-dub>
X-Original-Trace: 9 Dec 2004 08:51:21 -0800, ool-4353a821.dyn.optonline.net
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 9 Dec 2004 08:51:22 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 9 Dec 2004 08:51:26 -0800
X-Trace: forums-1-dub 1102611086 10.22.108.75 (9 Dec 2004 08:51:26 -0800)
X-Original-Trace: 9 Dec 2004 08:51:26 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:941
Article PK: 125367

Thanks - that gave me everything I needed. In fact, sorting on column
heading was specifically my first feature I wished to add...

-Dave

"Jack Addington" <jaddington@shaw.ca> wrote in message
news:41b876d2$1@forums-2-dub...
> Dave,
>
> Not sure what you are trying to do exactly. but here is an example from my
> clicked event
>
> private void DWAnc_Click(object sender, System.EventArgs e)
> {
> int x,y;
>
> Sybase.DataWindow.ObjectAtPointer obj = this.ObjectUnderMouse;
> Sybase.DataWindow.GraphicObject dwo = obj.Gob;
>
> if (obj.Gob.Empty)
> {
> x = DWAnc.MousePosition.X;
> y = DWAnc.MousePosition.X;
> }
> else
> {
> x = dwo.X;
> y = dwo.Y;
> }
>
> #region Menu Related
> // moved to mouseDown event
> // try
> // {
> // DataLogic.InitMenu(obj.RowNumber);
> // }
> // catch(Exception ex)
> // {
> // MessageBox.Show(ex.ToString(), "Error initializing menus");
> // }
> #endregion
>
> #region Row Sort Manager
> try
> {
> // call the sort manager
> if (obj.Band.Type.ToString() == "Header")
> if ( RowSortMgr != null) RowSortMgr.DWClicked(x, y, obj.RowNumber,
> dwo);
> }
> catch(Exception ex)
> {
> MessageBox.Show(ex.ToString(),"RowSort Manager Error");
> }
> #endregion
>
> #region Row Select Manager
> try
> {
> // call the rowmanager
> if ( RowSelectMgr != null) RowSelectMgr.DWClicked(x, y, obj.RowNumber,
> dwo);
> }
> catch(Exception ex)
> {
> MessageBox.Show(ex.ToString(),"Row Select Manager Error");
> }
> #endregion
>
> "DGerdner" <dave@ptax.org> wrote in message
news:41b8715c$1@forums-2-dub...
> > I've seen other posts on this, but they are for VB while I'm using C#
and
> > I
> > cannot get them to work. I am creating a base u_dw (sort of like PFC).
> > Just starting with the following code I am not able to get dwo populated
> > correctly; the dwo= line genereates an error "An object reference is
> > required....". Any help would be appreciated.
> >
> > private void u_dw_Click(object sender, System.EventArgs e)
> > {
> > Sybase.DataWindow.GraphicObjectText dwo;
> > String sColName;
> > dwo = u_dw.ObjectUnderMouse.Gob;
> > }
> >
> > --
> > David L Gerdner
> > Next Generation Software, Inc.
> > 201-571-0425
> >
> >
>
>


Jack Addington Posted on 2004-12-09 22:56:45.0Z
From: "Jack Addington" <jaddington@shaw.ca>
Newsgroups: sybase.public.datawindow.net
References: <41b8715c$1@forums-2-dub> <41b876d2$1@forums-2-dub> <41b88289$1@forums-2-dub>
Subject: Re: Getting information in clicked event
Lines: 104
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
NNTP-Posting-Host: s010600e018e32f17.cg.shawcable.net
X-Original-NNTP-Posting-Host: s010600e018e32f17.cg.shawcable.net
Message-ID: <41b8d82d@forums-1-dub>
Date: 9 Dec 2004 14:56:45 -0800
X-Trace: forums-1-dub 1102633005 68.147.199.171 (9 Dec 2004 14:56:45 -0800)
X-Original-Trace: 9 Dec 2004 14:56:45 -0800, s010600e018e32f17.cg.shawcable.net
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:951
Article PK: 125373

I emailed you some 'services' I have been working on...

"DGerdner" <dave@ptax.org> wrote in message news:41b88289$1@forums-2-dub...
> Thanks - that gave me everything I needed. In fact, sorting on column
> heading was specifically my first feature I wished to add...
>
> -Dave
>
> "Jack Addington" <jaddington@shaw.ca> wrote in message
> news:41b876d2$1@forums-2-dub...
>> Dave,
>>
>> Not sure what you are trying to do exactly. but here is an example from
>> my
>> clicked event
>>
>> private void DWAnc_Click(object sender, System.EventArgs e)
>> {
>> int x,y;
>>
>> Sybase.DataWindow.ObjectAtPointer obj = this.ObjectUnderMouse;
>> Sybase.DataWindow.GraphicObject dwo = obj.Gob;
>>
>> if (obj.Gob.Empty)
>> {
>> x = DWAnc.MousePosition.X;
>> y = DWAnc.MousePosition.X;
>> }
>> else
>> {
>> x = dwo.X;
>> y = dwo.Y;
>> }
>>
>> #region Menu Related
>> // moved to mouseDown event
>> // try
>> // {
>> // DataLogic.InitMenu(obj.RowNumber);
>> // }
>> // catch(Exception ex)
>> // {
>> // MessageBox.Show(ex.ToString(), "Error initializing menus");
>> // }
>> #endregion
>>
>> #region Row Sort Manager
>> try
>> {
>> // call the sort manager
>> if (obj.Band.Type.ToString() == "Header")
>> if ( RowSortMgr != null) RowSortMgr.DWClicked(x, y, obj.RowNumber,
>> dwo);
>> }
>> catch(Exception ex)
>> {
>> MessageBox.Show(ex.ToString(),"RowSort Manager Error");
>> }
>> #endregion
>>
>> #region Row Select Manager
>> try
>> {
>> // call the rowmanager
>> if ( RowSelectMgr != null) RowSelectMgr.DWClicked(x, y,
>> obj.RowNumber,
>> dwo);
>> }
>> catch(Exception ex)
>> {
>> MessageBox.Show(ex.ToString(),"Row Select Manager Error");
>> }
>> #endregion
>>
>> "DGerdner" <dave@ptax.org> wrote in message
> news:41b8715c$1@forums-2-dub...
>> > I've seen other posts on this, but they are for VB while I'm using C#
> and
>> > I
>> > cannot get them to work. I am creating a base u_dw (sort of like PFC).
>> > Just starting with the following code I am not able to get dwo
>> > populated
>> > correctly; the dwo= line genereates an error "An object reference is
>> > required....". Any help would be appreciated.
>> >
>> > private void u_dw_Click(object sender, System.EventArgs e)
>> > {
>> > Sybase.DataWindow.GraphicObjectText dwo;
>> > String sColName;
>> > dwo = u_dw.ObjectUnderMouse.Gob;
>> > }
>> >
>> > --
>> > David L Gerdner
>> > Next Generation Software, Inc.
>> > 201-571-0425
>> >
>> >
>>
>>
>
>