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.

calculating the X,Y of a column in a multirow DW

2 posts in DataWindow .NET Last posting was on 2004-11-20 17:36:19.0Z
Jack Addington Posted on 2004-11-19 18:03:33.0Z
From: "Jack Addington" <jaddington@shaw.ca>
Newsgroups: sybase.public.datawindow.net
Subject: calculating the X,Y of a column in a multirow DW
Lines: 15
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
NNTP-Posting-Host: s010600e018e32f17.cg.shawcable.net
X-Original-NNTP-Posting-Host: s010600e018e32f17.cg.shawcable.net
Message-ID: <419e3575@forums-1-dub>
Date: 19 Nov 2004 10:03:33 -0800
X-Trace: forums-1-dub 1100887413 68.147.193.82 (19 Nov 2004 10:03:33 -0800)
X-Original-Trace: 19 Nov 2004 10:03:33 -0800, s010600e018e32f17.cg.shawcable.net
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:767
Article PK: 125195

I understand that the GraphicObjectColumn.X,Y give me the PB units of the
column. I can covert that into pixels. But is there a function that gives
the absolute X,Y position inside the DW object?

I know there is a big long gross calculation in the PowerBuilder PFC
pfc_n_cst_dropdown that can figure it out based on column borders,
datawindow borders etc. Do I need to port that or is there a native call I
can make in DataWindow.Net to get that?

I am trying to popup an object directly below the clicked on column.

thx


dfish Posted on 2004-11-20 17:36:19.0Z
From: dfish@_no_spam_sybase.com (Dave Fish [Team Sybase])
Newsgroups: sybase.public.datawindow.net
Subject: Re: calculating the X,Y of a column in a multirow DW
Organization: Sybase Professional Services
Reply-To: nospam_dfish@sybase.com_nospam
Message-ID: <419f7f41.55849747@forums.sybase.com>
References: <419e3575@forums-1-dub>
X-Newsreader: Forte Free Agent 1.21/32.243
NNTP-Posting-Host: vpn-dub-091.sybase.com
X-Original-NNTP-Posting-Host: vpn-dub-091.sybase.com
Date: 20 Nov 2004 09:36:19 -0800
X-Trace: forums-1-dub 1100972179 10.22.120.91 (20 Nov 2004 09:36:19 -0800)
X-Original-Trace: 20 Nov 2004 09:36:19 -0800, vpn-dub-091.sybase.com
Lines: 51
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:773
Article PK: 125200

I played around with this a while back. I ended up with something like
this which worked ok for the y coordinate but, depending on where the
user clicked in the column, the x coordinate wasn't what I needed.
Perhaps it will get you started down the right path though:

Private Sub DwcGrid_ItemFocusChanged(ByVal sender As Object, ByVal
e As Sybase.DataWindow.ItemFocusChangedEventArgs) Handles
DwcGrid.ItemFocusChanged
Dim pointer As System.Drawing.Point
Dim xcoord As Integer
Dim ycoord As Integer

MonthCalendar1.Hide()
If e.ColumnName = "datecolumn" Then
pointer = DwcGrid.MousePosition()
xcoord = pointer.X
ycoord = pointer.Y
MonthCalendar1.SetBounds((xcoord - 140), (ycoord - 20),
MonthCalendar1.Width, MonthCalendar1.Height)
MonthCalendar1.Show()
End If
End Sub

Regards,
Dave Fish
Sybase

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

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

On 19 Nov 2004 10:03:33 -0800, "Jack Addington" <jaddington@shaw.ca>

wrote:

>I understand that the GraphicObjectColumn.X,Y give me the PB units of the
>column. I can covert that into pixels. But is there a function that gives
>the absolute X,Y position inside the DW object?
>
>I know there is a big long gross calculation in the PowerBuilder PFC
>pfc_n_cst_dropdown that can figure it out based on column borders,
>datawindow borders etc. Do I need to port that or is there a native call I
>can make in DataWindow.Net to get that?
>
>I am trying to popup an object directly below the clicked on column.
>
>thx
>
>
>