How to cancel a DDDW selection

F4 has been stated as being the default way for DDDW to drop down or
cancel.  However, if you hit F4 then hit the up or down arrow to move
through the displayed list, when you then hit F4 to cancel the
selection, it automatically selects the row that you were last on.  In
my view, I think it should put back whatever it was there in the first
place.  Is there a way to do that??  Is there an ActionCode for that??

Thanks.

Harry
0
Harry
6/17/1998 4:21:02 PM
sybase.powerbuilder.datawindow 28057 articles. 4 followers. Follow

11 Replies
738 Views

Similar Articles

[PageSpeed] 14

As you scroll through a DDDW, you are changing the selection (i.e. the
itemchanged event fires.) To make it behave differently, you would have to
code the behavior you wish.

Harry Evangelou wrote in message <3587ECEE.F9C15268@gitrac.com>...
>F4 has been stated as being the default way for DDDW to drop down or
>cancel.  However, if you hit F4 then hit the up or down arrow to move
>through the displayed list, when you then hit F4 to cancel the
>selection, it automatically selects the row that you were last on.  In
>my view, I think it should put back whatever it was there in the first
>place.  Is there a way to do that??  Is there an ActionCode for that??
>
>Thanks.
>
>Harry


0
Rick
6/17/1998 5:39:50 PM
Thanks Rick but maybe I need to explain further.

Currently on my itemchanged event I'm doing a lot of processing based
on the item selected.  What I would like to do is differentiate from
when the user is just scrolling up and down while browsing the list
with the arrow keys vs. making a selection by hitting the enter key. 
Currently the way DDDWs work, every time you keyboard scroll you get
an itemchanged event.  This is in contrast when you click-and-hold
while scrolling with the mouse.  It is that same exact behavior like
the mouse that I would like to duplicate while using the keyboard.

Is there ANYTHING!! that I can use from the event data or anywhere
else, that will tell me that the drop down list is still in the drop
down state, or anything else that will cause me to pass on my
itemchanged processing while the user is browsing with the up/down
arrow keys??

Thanks.

Harry

Rick Seeley wrote:
> 
> As you scroll through a DDDW, you are changing the selection (i.e. the
> itemchanged event fires.) To make it behave differently, you would have to
> code the behavior you wish.
> 
> Harry Evangelou wrote in message <3587ECEE.F9C15268@gitrac.com>...
> >F4 has been stated as being the default way for DDDW to drop down or
> >cancel.  However, if you hit F4 then hit the up or down arrow to move
> >through the displayed list, when you then hit F4 to cancel the
> >selection, it automatically selects the row that you were last on.  In
> >my view, I think it should put back whatever it was there in the first
> >place.  Is there a way to do that??  Is there an ActionCode for that??
> >
> >Thanks.
> >
> >Harry
0
Harry
6/17/1998 7:13:13 PM
As Rick already hinted the Itemchanged event is the place to look
(Check for the key, if its Arrows, set a flag, reject, get out. In itemerror
check the flag, if set - suppress the error message, reset flag, get out)


0
Philip
6/17/1998 9:59:05 PM
Thanks Philip.

However, it seems that the Datawindow KEYDOWN event is not getting the
up and down key events (can anyone from Powersoft explain this??).  I
debugged this, and I'm getting every other key I tried except the UP
and DOWN arrows.  They instead generate only a Itemchange event. 
So... I'm back where I started... Anyone have any ideas?? (like how to
trap the UP/DOWN arrows).

Harry

Philip Salgannik wrote:
> 
> As Rick already hinted the Itemchanged event is the place to look
> (Check for the key, if its Arrows, set a flag, reject, get out. In itemerror
> check the flag, if set - suppress the error message, reset flag, get out)
0
Harry
6/18/1998 2:19:23 PM
Forget about the Datawindow KEYDOWN event for a while....
I pretty much spelled out what You have to do...

In a primitive way here it goes:

//Itemchanged event for your base class Datawindow or if you do not have one
than for the one in question

//Should we do the itemchange on arrows????????????????????????
IF (Keydown(KeyUpArrow!) OR Keydown(KeyDownArrow!)) THEN
 This.ib_arrow = TRUE    //the flag I was talking about in my previous post
 RETURN 1
END IF
//the rest of Itemchanged event

//Itemerror event for your base class Datawindow or if you do not have one
than for the one in question

IF ib_arrow THEN
 ib_arrow = FALSE
 RETURN 1
END IF

//the rest of Itemerror event
Regards, Philip



0
Philip
6/18/1998 3:23:50 PM
Thanks Philip... however I'm using Power++... so I still need to find
a way to get the Up and Down Arrow keys (I know this is not a
PowerBuilder specific question and at least you just told me that in
PowerBuilder you are able to get those events, so I'm wondering if
that is a Power++ bug since all the other keys are coming through on
the DW_KeyDown event).

Sorry for crossposting but 95% of the problems/questions with DWs in
Power++ are also relevant problems/questions with PowerBuilder as well
so I always learn something new by hearing both sides of the fence.

Many thanks.

Harry

Philip Salgannik wrote:
> 
> Forget about the Datawindow KEYDOWN event for a while....
> I pretty much spelled out what You have to do...
> 
> In a primitive way here it goes:
> 
> //Itemchanged event for your base class Datawindow or if you do not have one
> than for the one in question
> 
> //Should we do the itemchange on arrows????????????????????????
> IF (Keydown(KeyUpArrow!) OR Keydown(KeyDownArrow!)) THEN
>  This.ib_arrow = TRUE    //the flag I was talking about in my previous post
>  RETURN 1
> END IF
> //the rest of Itemchanged event
> 
> //Itemerror event for your base class Datawindow or if you do not have one
> than for the one in question
> 
> IF ib_arrow THEN
>  ib_arrow = FALSE
>  RETURN 1
> END IF
> 
> //the rest of Itemerror event
> Regards, Philip
0
Harry
6/18/1998 5:08:31 PM
I have a feeling that You are still not getting my point.
First of all are You absolutely sure that all the keys are coming through
the DW_KeyDown Event?
How about the Enter key? :-))))
I don't use Power++, but I am almost positive that Up and Down Arrow keys
will be swallowed if and only if the column that has focus in the Datawindow
has a DDDW edit style (not sure about DDLB, have to check on that) and they
will fire the Itemchanged event.

So I am not clear on what the problem is considering the way you described
the challenge that You are trying to overcome:
 "Currently on my itemchanged event I'm doing a lot of processing based
on the item selected.  What I would like to do is differentiate from
when the user is just scrolling up and down while browsing the list
with the arrow keys vs. making a selection by hitting the enter key. "

Regards, Philip


0
Philip
6/18/1998 6:20:18 PM
Yup... All keys are coming through the DW_KeyDown event (including
Enter, ESC, Tab, Left Arrow, Right Arrow etc..), EXCEPT!! the UP and
DOWN arrow.  And NO! I'm not crazy..  Something tells me that these
are eaten by the power++ version in order to fire the itemchange event
that happens automatically every time you press UP or DOWN arrow on a
DDDW.  Can someone from Power++ team confirm this??  Is there a
workaround??

Harry  

Philip Salgannik wrote:
> 
> I have a feeling that You are still not getting my point.
> First of all are You absolutely sure that all the keys are coming through
> the DW_KeyDown Event?
> How about the Enter key? :-))))
> I don't use Power++, but I am almost positive that Up and Down Arrow keys
> will be swallowed if and only if the column that has focus in the Datawindow
> has a DDDW edit style (not sure about DDLB, have to check on that) and they
> will fire the Itemchanged event.
> 
> So I am not clear on what the problem is considering the way you described
> the challenge that You are trying to overcome:
>  "Currently on my itemchanged event I'm doing a lot of processing based
> on the item selected.  What I would like to do is differentiate from
> when the user is just scrolling up and down while browsing the list
> with the arrow keys vs. making a selection by hitting the enter key. "
> 
> Regards, Philip
0
Harry
6/18/1998 10:06:14 PM
> Something tells me that these are eaten by the power++ version in order
>to fire the itemchange event that happens automatically every time you
>press UP or DOWN arrow on a DDDW

 I am almost ready to give up on You :-))

These keys ate eaten up in POWERBUILDER also and the only SANE way to trap
them is the one
I already sent you the code for....



0
Philip
6/18/1998 10:15:18 PM
I appreciate your diligence and patience 8^)

I do understand your code and that is what I tried to also do in the
first place, but I don't know yet of a Power++ equivalent way to do
the PowerBuilder command of Keydown() (which I assume is just a raw
keyboard check) that I can use within the itemchange event.  Maybe
someone with Power++ or C++ experience might help.

Thanks.

Harry

Philip Salgannik wrote:
> 
> > Something tells me that these are eaten by the power++ version in order
> >to fire the itemchange event that happens automatically every time you
> >press UP or DOWN arrow on a DDDW
> 
>  I am almost ready to give up on You :-))
> 
> These keys ate eaten up in POWERBUILDER also and the only SANE way to trap
> them is the one
> I already sent you the code for....
0
Harry
6/18/1998 10:25:26 PM
Now we are talking hehehehe
If you started with this statement we would have saved a lot of bandwidth.
Can't help you with  this one in the Power++ sense, but I would be REALLY
surprized if it did not have
some kind of call for this considering that it is a C++ tool.
Or you can resort to API calls like GetKeyState, GetAsyncKeyState etc.


0
Philip
6/18/1998 10:45:51 PM
Reply:

Similar Artilces:

Multiple Selections in Child DataWindow DDDW
Dear All, I would like to know, is there any possibility to select more than one record in DropDownDataWindowss attached to a column in a DataWindow Thanks in advance 1. Use: GetChild method of DataWindow control to get DropDown DW as a DatawindowChild object 2. Work with DatawindowChild object to set the selection "Sybase" <kr_vasudev@hotmail.com> schrieb im Newsbeitrag news:40e4fe47$1@forums-2-dub... > Dear All, > > I would like to know, is there any possibility to select more than one > record in DropDownDataWindowss attached ...

Selecting Null from a DDDW using custom datawindow component
I have a dropdown datawindow which selects products from a product table. I also allow selection of all products by using NULL as the 'Select All' value SELECT product_no as prod_no, product_desc as desc FROM products UNION SELECT NULL as prod_no, '(All Products) as desc FROM products I then have a computed field, which is used as the display column, with the following expression if(IsNull(prod_no),'(All Products)',desc) Whenever I select the '(All Products)' from the dropdown through the web dw component I get the...

powerbuilder 10 build 8075 datawindow dddw bug.
If the datawindow column type is money and has dddw, I get error message "Expression is invalid". If I replace dot with comma in regional settings, I can solve the problem. I am using Turkish Charset. thanks We also get the same error message when we apply a filter that has a dash '-' in the expression (using setFilter()). We went back to 8050. Larry "Murat Yelkovan" <muratyelkovan@yahoo.com> wrote in message news:43181629$1@forums-2-dub... > If the datawindow column type is money and has dddw, I get error message > "Expressi...

selected row in the datawindow to displayed in the other datawindow
hi iam unable to display the data which is selected data in one datawindow to other datawindow. thnaks deva see IsSelected functions and transfer those rows to the other DW Regards Vasu "Vasu D" <vasu@i-vantage.com> wrote in message news:sDZOLqlpCHA.187@forums.sybase.com... > hi > iam unable to display the data which is selected data in one datawindow to > other datawindow. > thnaks > deva > > > Hello Vasu D, Are u using shared dw's? In this case you'll only have to use the function dw_secundary.scrolltor...

Export datawindow select statement form all datawindows
I have a large application with a lot of DWs. DB is SQL Server 2000. Some DW use " (double quotes) in the select statement (not '), and now, with PB105 and oledb, this statements fails (MS native driver works) I know that " isn't a valid character for delimiting strings in SQL, but this large application was written by many people :) How can I find all " in all select statements in all DW within my application to do a replace. Thanks, Alex B. Hi Alex, I'm not sure wether some tool like PBL Peeper is capable...

superreview cancelled: [Bug 181105] Selection behaves badly when SpellCheck Selection is on : [Attachment 141155] Make alternate selection types render properly
Neil Deakin <enndeakin@sympatico.ca> has cancelled Boris Zbarsky <bzbarsky@mit.edu>'s request for superreview: Bug 181105: Selection behaves badly when SpellCheck Selection is on http://bugzilla.mozilla.org/show_bug.cgi?id=181105 Attachment 141155: Make alternate selection types render properly http://bugzilla.mozilla.org/attachment.cgi?id=141155&action=edit ...

does an insert on xforms-select event necessarily cancel select?
Hi, i would like to invoke an insert (on another data node) when the user selects an item in a select form control. however with an insert the normal select doesn't work anymore. i searched through the spec's and i couldn't find any reason why this should block the normal capture/ bubbling of xforms-select and cancel subsequent events... is this a current limitation of the plugin or did i miss something in the spec? thanks in advance claude On Feb 10, 3:14=A0am, bernstein <clauden...@gmail.com> wrote: > Hi, > > i would like to invoke an insert...

How to select manually an item (make it currently selected) in DDDW?
Hi all, I have a DDDW which auto-retrieves the relevant data for a drop-down inside a datawindow. After the datawindow is loaded I want to manually select a certain data/display in the DDDW. Does anyone know how to achieve this? Please drop some sample if you have any. Thanking you for your time, Best regards, A Do a setitem on the base column to the data value for the row in the DDDW that you want. -- Report Bugs: http://case-express.sybase.com/cx/welcome.do Product Enhancement Requests: http://my.isug.com/cgi-bin/1/c/submit_enhancement "@maram" <at...

datawindow.selected
datawindow.selected() highlight the column with black background. is there anyway to assign a different color. TIA. > datawindow.selected() highlight the column with black > background. is there anyway to assign a different color. > TIA. AFAIK, No ...

SELECT from SELECT
Hi! I remember seeing an example where you can do a select from a nested select, but I cannot seem to make it work. So it would be something like this: select max( name ) from ( select name from customer union select name from vendor ) Was I dreaming I saw that? Thanks! D In article <4500243f@forums-2-dub>, daniel_AT_infrontsoftware_DOT_com@N0SPAM.com says... > Hi! > > I remember seeing an example where you can do a select from a nested > select, but I cannot seem to make it work. No, you weren't. Try (UNTESTED!) adding a...

Datawindow select
When I tried to look at the SQL behind a datawindow it I get a message saying sp_pb60primarykey not found. Is something missing? We are using PB6.5 with Sybase. Thanks. You have to install the required stored procedures in your SQL Server. The procedures are located in the script PBSYC.SQL and directions for running that script can be found in the Connecting To Your Database book. Jim O'Neil Sybase Technical Support joneil@sybase.com Saravana wrote: > When I tried to look at the SQL behind a datawindow it I get a message > saying sp_pb60primarykey not found. Is...

Canceling a select
Is there a way to either: 1) dynamically modify the select statement used as the data source for a pipeline, like Modify will do for a datawindow, or 2) cancel a select executed dynamically from a script? I want to build a select statement in a string, execute it, and put the results into a temporary table, but also be able to cancel the select before it finishes. If I do the select in a datawindow, I can cancel with dbCancel but then it looks like I have to insert the rows one at a time into the temporary table. All ideas are welcome. Thanks in advance. On Wed, 12 Nov 1997 ...

Web resources about - How to cancel a DDDW selection - sybase.powerbuilder.datawindow

Selection - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Victoria tells coach David Saker to quit criticising Australian cricket team selections
The maverick Victorian coach David Saker will be told to button his lip on matters concerning the Australian team and its selection, after angering ...

Ed Feng's College Football Playoff Standings Predictions Before Selection Sunday
Bleacher Report Ed Feng's College Football Playoff Standings Predictions Before Selection Sunday Bleacher Report Will your team make the College ...

Jury Selection Begins for Officer Charged in Gray's Death
CBS Local Jury Selection Begins for Officer Charged in Gray's Death CBS Local BALTIMORE (WNEW/AP) — Jury selection for the first police officer ...

Jury selection to begin in first Freddie Gray trial
Officer William Porter could spend at least 10 years in prison if convicted for his alleged role in the death of the 25-year-old black man

Hulu to offer lulu of a video selection
Site created by NBC Universal and News Corp. to debut Wednesday with shows from more than 50 TV networks, cable stations, and movie studios. ...

After Protest, VA Rescinds Selection Of Phoenix VA Overseer Who Misled Congress About Wait Times
After Protest, VA Rescinds Selection Of Phoenix VA Overseer Who Misled Congress About Wait Times

Jury selection begins in the first of six trials in Freddie Gray case
... in the back of a police van, the trial for the first of six Baltimore police officers accused of killing him is officially underway. Jury selection ...

Prices For CFP and Bowl Game Tickets Dropping On Secondary Market After Selection Sunday
The College Football Playoff and bowl schedule are officially set, and ticket prices have already begun to fall on the secondary market. Both ...

AP PHOTOS: A Selection of Pictures From the Past Week
AP PHOTOS: A selection of pictures from the past week

Resources last updated: 12/13/2015 8:19:09 PM