using xbek_ keys in dcpushbutton and dchotkey

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
obelix
Posts: 48
Joined: Tue Dec 03, 2013 7:44 am
Location: Villingen-Schwenningen, Black Forest, Germany

using xbek_ keys in dcpushbutton and dchotkey

#1 Post by obelix »

hi everybody,
i want to use the xbek_enter key to close a dcbrowse-window after having finished a codeblock in a pushbutton without returning to the dcbrowse-window
@ x, y DCPUSHBUTTON CAPTION "New Record" SIZE 12i,1 FONT textfont1;
ACTION {||p_newrec(),oBrowse:RefreshAll(),???()}
and DCHOTKEY xbeK_ENTER ACTION {||???()}
without using ADDBUTTONS

Ist ist possible to use dchotkey with xbek_ key for the alphabet keys (A,a...Z,z) including the additional characters (äöü*)
(ascii 33-254). I can't find a value in appevent.ch or somewhere else. 8-) 8-)
quiet old but still young and unskilled in express++

User avatar
rdonnay
Site Admin
Posts: 4734
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: using xbek_ keys in dcpushbutton and dchotkey

#2 Post by rdonnay »

Your question is confusing.

When you say you want to close a Browse window, what does that mean?
Is this another window that is running in another thread?
Are you saying that you want to close the current window?
You mention that you want it to act on the xbeK_ENTER key, but then you also want it to act on all other keys.

Please clarify what you want to do?
The eXpress train is coming - and it has more cars.

User avatar
obelix
Posts: 48
Joined: Tue Dec 03, 2013 7:44 am
Location: Villingen-Schwenningen, Black Forest, Germany

Re: using xbek_ keys in dcpushbutton and dchotkey

#3 Post by obelix »

I'm asking for two solutions:
1. I want to leave the current DCBROWSE - Windows and go back to the parent window by using DCHOTKEY xbek_ENTER but I don't know the codeblock I`ve to write in the ACTION parameter. Additionally I want to use a DCPUSHBUTTON, because I cannot add another font, if I use ADDBUTTONS.

2. I want to use character keys to trigger an action in a DCBROWSE-Window (in order to simualte the user function in dbedit())
quiet old but still young and unskilled in express++

User avatar
Tom
Posts: 1179
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: using xbek_ keys in dcpushbutton and dchotkey

#4 Post by Tom »

2. I want to use character keys to trigger an action in a DCBROWSE-Window (in order to simualte the user function in dbedit())

Code: Select all

@ x,y DCBROWSE oBrowse ...

* more code

DCREAD GUI ... HANDLER MyHandler REFERENCE @oBrowse

FUNCTION MyHandler (nEvent,mp1,mp2,oXbp,oDlg,GetList,oBrowse)
IF nEvent = xbeP_Keyboard .and. Upper(Chr(mp1)) = "A"
  * do something reflecting character "A" was typed, f.i. search for the next record beginning with "A" 

ELSIF ...

ENDIF
RETURN DCGUI_NONE
and so on
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
obelix
Posts: 48
Joined: Tue Dec 03, 2013 7:44 am
Location: Villingen-Schwenningen, Black Forest, Germany

Re: using xbek_ keys in dcpushbutton and dchotkey

#5 Post by obelix »

Thank you Tom, that's what I was looking for. :P
quiet old but still young and unskilled in express++

Post Reply