How to trap down arrow key and uparrow key on dropdown datawindow column when
focus on it?
Thanks
Lucky
---== Posted via the PFCGuide Web Newsreader ==---
http://www.pfcguide.com/_newsgroups/group_list.asp
>hi All
>
>How to trap down arrow key and uparrow key on dropdown datawindow column when
>focus on it?
Lucky,
Are you looking for something similar to the DDDW rowfocuschanged
event?
In any case you can get to a lot of DDDW events through the
pbm_command event on the parent datawindow.
iDDDWHandle = Handle ( dwc )
ue_command mapped to pbm_command
=========
IF hwndchild = iDDDWHandle THEN
CHOOSE CASE notificationcode
CASE 2048 // or 2049
// DDDW RowFocusChanged
CASE 1281
// DDDW Clicked
CASE 2314
// DDDW RightMouseButtonDown
CASE 2313
// DDDW LeftMouseButtonUp
CASE 2317
// DDDW VScroll
CASE 2318
// DDDW HScroll
CASE 2311
// DDDW Mouse Move
CASE 769
// DDDW Retrieve End
END CHOOSE
END IF
--
Boris Gasin [TeamSybase]
mailto:bga...@dynamictechgroup.com
Close to NJ? Join the NJ Sybase Tools User Group
http://www.njpbug.org/njpbug/join/join.asp
--
Simon Caldwell
Get Real Systems Ltd
Holtby Manor, Stamford Bridge Road, York, YO19 5LL
Tel +44 (0)1904 481999 Fax +44 (0)1904 481666
Visit us at www.getrealsystems.com
Procurement Control Specialists
Controlling corporate spend and streamlining procurement processes
"Lucky" <lucky...@yahoo.com> wrote in message
news:UMLJm65...@forums.sybase.com...
Thanks for this good code. But I have different problem , I need to trap up/down
arrow key on dddw.
I have big PB application which run on T1 lines , 56 k lines and also on dial up
connection . Application running fine on T1 lines but on 56 k and on dials up
connection it slow and performance is not good. One of the problem is dropdown
datawindow. Some times dddw have 50 , 100 or more rows.
So we come to solution that first time don’t retrieve all row in dddw ,
retrieve only one record. When user click on dddw or up/down arrow key then
retrieve all the rows or what ever “where clause” is .
I trap click event and all other keys. But not able to trap up/down arrow key
on dddw. The code which you sent is very good code and working too , but for
other events. Could you give full list of “notificationcode” or where I can I
get these code?
Or could you suggest me any other way to trap up/down arrow key on dddw ?
I meet you three years back in San Francisco user group meeting. You did
presentation on PFC , was very good. It been long , probably you don’t remember.
Any ways thanks for help.
>
>Thanks for this good code. But I have different problem , I need to trap up/down
>arrow key on dddw.
>
>I have big PB application which run on T1 lines , 56 k lines and also on dial up
>connection . Application running fine on T1 lines but on 56 k and on dials up
>connection it slow and performance is not good. One of the problem is dropdown
>datawindow. Some times dddw have 50 , 100 or more rows.
>
>So we come to solution that first time don’t retrieve all row in dddw ,
>retrieve only one record. When user click on dddw or up/down arrow key then
>retrieve all the rows or what ever “where clause” is .
>
>I trap click event and all other keys. But not able to trap up/down arrow key
>on dddw. The code which you sent is very good code and working too , but for
>other events. Could you give full list of “notificationcode” or where I can I
>get these code?
>
>Or could you suggest me any other way to trap up/down arrow key on dddw ?
>
>I meet you three years back in San Francisco user group meeting. You did
>presentation on PFC , was very good. It been long , probably you don’t remember.
>Any ways thanks for help.
>
>Lucky
Create a user event on the datawindow and map it to pbm_dwndropdown.
That will do what you ask, mostly... <g>
The users can tab to the DDDW column using the keyboard and then use
the arrow keys to scroll thorough the DDDW values without actually
dropping it or clicking on the arrow.
ItemChanged event on the parent datawindow will fire, but only if data
in the parent column does not match the single row in the DDDW.
I would trigger the event to retrieve the DDDW in two places, the
pbm_dwndropdown and another in ItemChanged. Set a
flag in an instance var to only retrieve once.
IF KeyDown(KeyDownArrow!) OR KeyDown(KeyUpArrow!) THEN
//Reject the value and retrieve the dddw
San Francisco? That was 2 maybe 3 years ago! That was my first time
there and I was blown away! I stayed over the weekend with my son and
we had a blast!
Who is Lucky? I remember Amine, Brendan Campbell, David Golden, Linda
Dudzic...
I'd suggest retrieving the dddw data up front, when the application is
started, and caching it in a datastore. Then when you open your window,
share (or copy, this is much quicker if you have a lot of rows in your dddw)
the data with your dddw.
I'd also suggest that 100 or more rows in a dddw is too many, it's very
difficult to use. A popup search window would be more friendly.
Simon
That’s exactly I am trying to do . When first time user tab to DDDW , DDDW have
only one row and when user use up/down arrow key then I am go to retrieve DDDW
with some additional retrieval argument.
I use all type of codes to trap down/up key when focus on DDDW , But not able
to do it. I search all over the net but not able to find it.
I used GetKeyState() API , Pbm_command function but not able to to trap down/up
key when focus on DDDW.
Need some help
Lucky
Here code which I used
http://my.sybase.com/detail?id=44545
http://my.sybase.com/detail?id=47760
GetKeyState( )
This function returns the present state of a specific key on the keyboard based
on that key's ASCII representation. A zero value represents that the key is not
pressed. There is no PowerBuilder equivalent.
Global External Function:
Function int GetKeyState(integer VirtualKeycode) Library "User32.dll"
Script:
int rtn
rtn = GetKeyState(40 ) // 65 = down key
if rtn = 0 then
MessageBox("Key State"," down key not pressed!")
else
MessageBox("Key State"," down key is pressed!")
end if
---------------------------------------------
iDDDWHandle = Handle ( dwc_child1 )
//
//ue_command mapped to pbm_command
//=========
//
IF hwndchild = iDDDWHandle THEN
CHOOSE CASE notificationcode
CASE 2048 // or 2049
// DDDW RowFocusChanged
CASE 1281
// DDDW Clicked
CASE 2314
// DDDW RightMouseButtonDown
CASE 2313
// DDDW LeftMouseButtonUp
CASE 2317
// DDDW VScroll
CASE 2318
// DDDW HScroll
CASE 2311
// DDDW Mouse Move
CASE 769
// DDDW Retrieve End
CASE 2339
// pageup / pagedown
CASE 2326
CASE 2306
// up arrow
END CHOOSE
END IF
On Wed, 23 Jan 2002 14:41:29 -0500,
in powersoft.public.powerbuilder.datawindow
Boris Gasin [TeamSybase] <NOSPAM...@dynamictechgroup.com> wrote:
---== Posted via the PFCGuide Web Newsreader ==---
http://www.pfcguide.com/_newsgroups/group_list.asp
Lucky
On Fri, 25 Jan 2002 17:31:26 -0500,
in powersoft.public.powerbuilder.datawindow
Thanks
Lucky
On Thu, 24 Jan 2002 09:29:45 -0000,
in powersoft.public.powerbuilder.datawindow
---== Posted via the PFCGuide Web Newsreader ==---
http://www.pfcguide.com/_newsgroups/group_list.asp
--
Simon Caldwell
Get Real Systems Ltd
Holtby Manor, Stamford Bridge Road, York, YO19 5LL
Tel +44 (0)1904 481999 Fax +44 (0)1904 481666
Visit us at www.getrealsystems.com
Procurement Control Specialists
Controlling corporate spend and streamlining procurement processes
"Lucky" <lucky...@yahoo.com> wrote in message
news:p$f2FJfp...@forums.sybase.com...