How to substitute the stroke of key "enter" on the key "tab" in DW?

Good day/night friends!

I have to move on the fields in DW by key enter, not tab. It's not standart 
DW's behavior, so I extended user event ue_keydown from predefined PB's 
pbm_dwnkey event and put follow code into it.

/***********/
if key = keyenter! then
        this.event ue_keydown(keytab!, 0)
end if

if key = keytab! then
        messagebox("", "bla bla")//this line for test purpose only
end if
/***********/
As I see this script works (the message displays)when I stroke key enter, 
but the cursor dosent move to the next field in DW.
I cant use the setcolumn() function for that DW cause I have dynamic number 
of   fields, for example 4 in the first row, 6 in the second one and etc.

Please help to solve this problem.
Thank you for any help.
0
Dmitry_Kovtun
6/5/2002 5:55:37 AM
sybase.powerbuilder.datawindow 28057 articles. 4 followers. Follow

7 Replies
1195 Views

Similar Articles

[PageSpeed] 42

You must simulate Tab pressing via WinAPI function keybd_event.
there is declaratioon of this function in global external functions section:

subroutine keybd_event(char bVk, char bScan, long dwFlags, long dwExtraInfo)
library "user32.dll";

And there is script for simulation Tab (you must simulate also key release):

IF Key = KeyTab! THEN
  keybd_event(char(9),char(0),0,0)  // VK_TAB key down
    //KEYEVENTF_KEYUP = 2
  keybd_event(char(9),char(0),KEYEVENTF_KEYUP,0)  // VK_TAB key up
END IF

for more information about WinAPI, see MSDN (http://msdn.microsoft.com)

<Dmitry_Kovtun> wrote in message
news:F7526AC2B916A37500208EDE85256BCF.00208EEE85256BCF@webforums...
> Good day/night friends!
>
> I have to move on the fields in DW by key enter, not tab. It's not
standart
> DW's behavior, so I extended user event ue_keydown from predefined PB's
> pbm_dwnkey event and put follow code into it.
>
> /***********/
> if key = keyenter! then
>         this.event ue_keydown(keytab!, 0)
> end if
>
> if key = keytab! then
>         messagebox("", "bla bla")//this line for test purpose only
> end if
> /***********/
> As I see this script works (the message displays)when I stroke key enter,
> but the cursor dosent move to the next field in DW.
> I cant use the setcolumn() function for that DW cause I have dynamic
number
> of   fields, for example 4 in the first row, 6 in the second one and etc.
>
> Please help to solve this problem.
> Thank you for any help.


0
AlExis
6/5/2002 7:24:24 AM
On Wed, 5 Jun 2002 10:24:24 +0300, "AlExis Glinski" <alexis@st.by>
wrote:

>You must simulate Tab pressing via WinAPI function keybd_event.
>there is declaratioon of this function in global external functions section:
>
>subroutine keybd_event(char bVk, char bScan, long dwFlags, long dwExtraInfo)
>library "user32.dll";
>
>And there is script for simulation Tab (you must simulate also key release):
>
>IF Key = KeyTab! THEN
>  keybd_event(char(9),char(0),0,0)  // VK_TAB key down
>    //KEYEVENTF_KEYUP = 2
>  keybd_event(char(9),char(0),KEYEVENTF_KEYUP,0)  // VK_TAB key up
>END IF
>
>for more information about WinAPI, see MSDN (http://msdn.microsoft.com)
>

Also, you need to put this code in the pbm_dwnprocessenter event, and
return 1 to prevent the default processing (which is to scroll to the
next row).

Simon

0
Simon
6/5/2002 8:35:13 AM
> >IF Key = KeyTab! THEN
> >  keybd_event(char(9),char(0),0,0)  // VK_TAB key down
> >    file://KEYEVENTF_KEYUP = 2
> >  keybd_event(char(9),char(0),KEYEVENTF_KEYUP,0)  // VK_TAB key up
> >END IF

....
IF Key = KeyEnter! THEN
....
of course ;)

> Also, you need to put this code in the pbm_dwnprocessenter event, and
> return 1 to prevent the default processing (which is to scroll to the
> next row).
>
> Simon
>


0
AlExis
6/5/2002 10:23:45 AM
Try this:

Send (Handle(this), 256, 9, 0)



<Dmitry_Kovtun> escreveu na mensagem
news:F7526AC2B916A37500208EDE85256BCF.00208EEE85256BCF@webforums...
> Good day/night friends!
>
> I have to move on the fields in DW by key enter, not tab. It's not
standart
> DW's behavior, so I extended user event ue_keydown from predefined PB's
> pbm_dwnkey event and put follow code into it.
>
> /***********/
> if key = keyenter! then
>         this.event ue_keydown(keytab!, 0)
> end if
>
> if key = keytab! then
>         messagebox("", "bla bla")//this line for test purpose only
> end if
> /***********/
> As I see this script works (the message displays)when I stroke key enter,
> but the cursor dosent move to the next field in DW.
> I cant use the setcolumn() function for that DW cause I have dynamic
number
> of   fields, for example 4 in the first row, 6 in the second one and etc.
>
> Please help to solve this problem.
> Thank you for any help.


0
JC
6/5/2002 11:02:20 AM
"AlExis Glinski" <alexis@st.by.NOSPAM> wrote in message
news:PGDjlyHDCHA.81@forums.sybase.com...
> > >IF Key = KeyTab! THEN
> > >  keybd_event(char(9),char(0),0,0)  // VK_TAB key down
> > >    file://KEYEVENTF_KEYUP = 2
> > >  keybd_event(char(9),char(0),KEYEVENTF_KEYUP,0)  // VK_TAB key up
> > >END IF
>
> ...
> IF Key = KeyEnter! THEN
> ...
> of course ;)
>

No, it needs to go in the processenter event, in which case the check for
keyEnter! is redundant.  Otherwise, you'll still get the default behaviour.

--
All views expressed in this message are my own and not necessarily those of
my employer



0
Simon
6/5/2002 2:41:18 PM
This is the method I use:

Create a user event for your datawindow called 'ue_enter' based on
pbm_dwnprocessenter.  Put the following code in the event:

Send( Handle(This), 256, 9, Long(0,0) )      // Sends message to process the
TAB key
RETURN 1                                              // Ignore processing
the ENTER key


<Dmitry_Kovtun> wrote in message
news:F7526AC2B916A37500208EDE85256BCF.00208EEE85256BCF@webforums...
> Good day/night friends!
>
> I have to move on the fields in DW by key enter, not tab. It's not
standart
> DW's behavior, so I extended user event ue_keydown from predefined PB's
> pbm_dwnkey event and put follow code into it.
>
> /***********/
> if key = keyenter! then
>         this.event ue_keydown(keytab!, 0)
> end if
>
> if key = keytab! then
>         messagebox("", "bla bla")//this line for test purpose only
> end if
> /***********/
> As I see this script works (the message displays)when I stroke key enter,
> but the cursor dosent move to the next field in DW.
> I cant use the setcolumn() function for that DW cause I have dynamic
number
> of   fields, for example 4 in the first row, 6 in the second one and etc.
>
> Please help to solve this problem.
> Thank you for any help.


0
Dave
6/5/2002 4:38:35 PM
Add these 2 line of code to the pbm_dwnprocessenter event

Send(Handle(this),256,9,Long(0,0))
return 1


Then remove your pbm_keydown event.


<Dmitry_Kovtun> wrote in message
news:F7526AC2B916A37500208EDE85256BCF.00208EEE85256BCF@webforums...
> Good day/night friends!
>
> I have to move on the fields in DW by key enter, not tab. It's not
standart
> DW's behavior, so I extended user event ue_keydown from predefined PB's
> pbm_dwnkey event and put follow code into it.
>
> /***********/
> if key = keyenter! then
>         this.event ue_keydown(keytab!, 0)
> end if
>
> if key = keytab! then
>         messagebox("", "bla bla")//this line for test purpose only
> end if
> /***********/
> As I see this script works (the message displays)when I stroke key enter,
> but the cursor dosent move to the next field in DW.
> I cant use the setcolumn() function for that DW cause I have dynamic
number
> of   fields, for example 4 in the first row, 6 in the second one and etc.
>
> Please help to solve this problem.
> Thank you for any help.


0
Jim
6/5/2002 5:00:53 PM
Reply:

Similar Artilces:

Don't remember: how to convert the "ENTER" key into a "TAB" key on a DW
how to convert the "ENTER" key into a "TAB" key on a DW ? Lilian. Ok founded: http://home4u.hongkong.com/technology/programming/casualwriter/pb/dw004.htm :)) "Lilian Pigallio" <lpigallio@nospam.com> wrote in message news:4096511e@forums-2-dub... > how to convert the "ENTER" key into a "TAB" key on a DW ? > > Lilian. > > ...

Are there different between ViewState.Add("key","Word"); and ViewState["key"] = "Word";
I think the 1 and 2 are complete same, is it correct? 1. ViewState.Add("key","Word"); 2. ViewState["key"] = "Word";SuperCool Multiple ZIP - A utility to unzip multiple files and work with multiple zip filesSuperCool Random Number Generator You are correct, option 2 is short hand for option 1.Philip Beadle (MVP, MCAD, MCT DotNetNuke Core Team)...

<key id="key_savePage" key="&savePageCmd.command.key;" command-"Broswer:SavePage" modifiers="accel"/> ----^
Name: yel0sub Email: yel0subatcomcastdotnet Product: SeaMonkey Summary: <key id="key_savePage" key="&savePageCmd.command.key;" command-"Broswer:SavePage" modifiers="accel"/> ----^ Comments: Downloaded SeaMonkey 1.1.5 with same result on installation. PowerBook G4 OS X 10.4.10 Browser Details: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4 ...

Precedence of "where" ("of", "is", "will")?
Nobody on #perl6 today could answer this one. Is: Str | Int where { $_ } the same as: (Str | Int) where { $_ } or: Str | (Int where { $_ }) ? Followup questions, Mr. President: What kind of operators are "where", "of", "is", and "will"? Is there a reason that S03 doesn't list them? What are their precedence(s)? -- Chip Salzenberg - a.k.a. - <chip@pobox.com> Open Source is not an excuse to write fun code then leave the actual work to others. Chip Salzenberg writes: &...

.ALLCOL("%COLUMN%", " ", ", ", ", ")
Do you know anyway for me to exclude a subset of columns returned by this function. We have two columns (rec_user and rec_datetime) which are in all of our tables, but when generating triggers I want automatically generate a script which does not include those two columns but does include all other columns in that table. Bruce I should add that I am using PD 9.0.0.580. Bruce "Bruce Lamb" <lamb.bruce@mayo.edu> wrote in message news:6HgI315nCHA.155@forums.sybase.com... > Do you know anyway for me to exclude a subset of columns returned by this > function. ...

Key "." displays "," (comma)
For an EditLine from a window, the key "." displays "." (quite normal). But, for a filed from a DataWindow, the key "." displays "," (comma). Does any one knows how to solve this problem ? Thanks for any help ! The matter could be "Regional settings". French ones, for instance, are parametered for using "," as decimal separator. If you strike a "." from the numpad, you "logically" obtain a ",". Solution : modify this decimal separator, (or emigrate in another country... ;-)) I...

Databasefiles ".dat" and ".key"
I have a sample of database files with the extensions ".dat" and ".key". Does anyone know which type of database that is, and do I have access with D2010 Enterpr.? I know that there may be a password, but that is my next problem. On 12/01/2010 8:48 AM, Bruno Køhler Pedersen wrote: > I have a sample of database files with the extensions ".dat" and ".key". > Does anyone know which type of database that is, and do I have access with D2010 Enterpr.? > I know that there may be a password, but that is my next problem. Clarion is one suc...

quotes, quotes, quotes...
I am getting this error and I know what is causing it, but I have no idea how to fix it, any help would be great. The script steps through the /var/log/messages file on a linux server and puts The entries into a mysql database. However when it gets to the 'hlt' line in the messages file it just barfs. The single quotes are freaking it out. I know about quotes but not how to use in this situation. Thanks, Paul Error: May 27 17:53:00 localhost kernel: Checking 'hlt' instruction... OK. <----- doesn't like this in the messages file DBD::mysql::st exec...

How can I disable "A" key for "Archive"?
What I need: A way to disable the "A" key for "Archive". What I tried: I tried installing MenuEditor (http://menueditor.mozdev.org/), but it won't install because it doesn't install secure updates. I know some people, rather than wanting to answer the question, would rather get a justification as to why I need it. For those that are interested only... (and, even if you disagree with my justification, but you know the answer, can you please help me out with the answer anyway?) Why: 1. It's not terribly uncommon for me to start typing, not real...

double quote
hello there...  i tried everything of think but not working the way i wanted to be... not sure what i'm missing...i'm generating a <span> in code behind and then using in javascript.... here is what i'm doing code behind: int i=0string _keywordID = "keyword";string _name = row["visit_info_nm"].ToString().Trim(); String _getElementByID = String.Format("<span id='{0}' OnClick = \"document.getElementById('{1}').value='{2}';\">{3}</span><br>", i, _keywordID, _name, _name); here is what it generate : <span id='1' OnClick = \"document.getElementById('keyword')...

D2007: Pressing the "\" key produces "#"
Sometimes in D2007 when I press the backslash (\) key, it will change it to a hash (#). If I go to another application, this does not happen. What would cause this? Ed Dressel wrote: > What would cause this? An accidentally pressed Alt+Shift (switch keyboard layout) -- Andreas Hausladen >> What would cause this? > > An accidentally pressed Alt+Shift (switch keyboard layout) I've never used the regional settings options, and shouldn't that change it for all apps, not just Delphi? > An accidentally pressed Alt+Shift (switch keyboard lay...

"To" and "From" missing
When I print emails, the words "To" and "From" are blank, even though the "To" name and "From name (addresser, addressee) do show up. This is not a problem for other users on my system. Suggestions In mailbox right click, view. On the message window, right click and choose print options. Make sure print header is checked. -- Barry Merchant NSC Volunteer SysOp *** no email unless requested please!! *** > In mailbox right click, view. On the message window, right click and > choose print options. Make sure prin...

Using "+" or "||"
Using SQLAnywhere 5.5.04, I've gotten into the habit of using "||" in ISQL to indicate a string concatenation. I needed to paste my SQL statement into the PowerBuilder script painter for some embedded SQL, and PB didn't like the "||" very much at all. I changed it to "+" and it seems to be ok. Do these two operators indicate ~exactly~ the same thing? moin, afaik these two's are not the same! if you're using "||" and any term is NULL then in the resultstring the term will be ignored if you use "+" then the resu...

"End" and "Home" keys in Firefox
Name: Joey Gaona Email: ptwob_gaonaatyahoodotcom Product: Firefox Summary: "End" and "Home" keys in Firefox Comments: Mozilla, First of all, Firefox is a great web browser and I appreciate all the security features and stability. I've used this software for about a year and I can't get over one annoyance. The "End" and "Home" keys acting as duplicate functions for the "Page Up" and "Page Down" keys. Is there any intent in coming updates to make these buttons work more like a word processor; "End...

Web resources about - How to substitute the stroke of key "enter" on the key "tab" in DW? - sybase.powerbuilder.datawindow

Resources last updated: 12/1/2015 9:09:47 PM