Hi everybody,
In DCBROWSE I use the DCHOTKEY x_beK_F4 and it works
if I use in the same DCBROWSE the statement
case nEvent = xbeP_Keyboard .and. Upper(Chr(mp1)) = "S" in HANDLER Myhandler,
pushing the F4-key executes the xbeP_keyboard statement.
The other DCHOTKEYS F1, F2 and so on work correctly.
xebK_F4 doesn't work correctly
- obelix
- Posts: 48
- Joined: Tue Dec 03, 2013 7:44 am
- Location: Villingen-Schwenningen, Black Forest, Germany
xebK_F4 doesn't work correctly
quiet old but still young and unskilled in express++
Re: xebK_F4 doesn't work correctly
I don't understand your question.
Can you show me some source code?
Can you show me some source code?
The eXpress train is coming - and it has more cars.
- obelix
- Posts: 48
- Joined: Tue Dec 03, 2013 7:44 am
- Location: Villingen-Schwenningen, Black Forest, Germany
Re: xebK_F4 doesn't work correctly
hi Roger,
in this DCBROWSE-Window, I want to be able to use the PUSHBUTTON CAPTION "F4 Projekt "...
that's ok
but also the DCHOTKEY CAPTION "F4 Projekt". That's ok as long as I don't use the line
case nEvent = xbeP_Keyboard .and. Upper(Chr(mp1)) = "S"
in function myhandler4
if I could adress the F4-key in myhandler4,it would even be better but i dont't noch the value of mp1
thanks
@ 3,2 DCBROWSE oBrowse EDIT xbeBRW_ItemSelected MODE DCGUI_BROWSE_EDITEXIT ; //PARENT oTabPage1
DATA cAlias SIZE wcol,wrow FONT feldfont
DCBROWSECOL FIELD &felder1 WIDTH 6 ; //felder[1] ;
HEADER feldub1 PARENT oBrowse
...
....
@ wrow+vv, 1+hv DCPUSHBUTTON CAPTION "F1 Hilfe" SIZE 12+i,1 FONT textfont1 ACTION {||hpshelp()}
@ wrow+vv, 16+hv+i*1 DCPUSHBUTTON CAPTION "F2 Vorgang" SIZE 12+i,1 FONT textfont1 ACTION {||w_order(1),oBrowse:RefreshAll()}
@ wrow+vv, 31+hv+i*2 DCPUSHBUTTON CAPTION "F3 Kurzname" SIZE 12+i,1 FONT textfont1 ACTION {||w_order(2),oBrowse:RefreshAll()}
@ wrow+vv, 46+hv+i*3 DCPUSHBUTTON CAPTION "F4 Projekt" SIZE 12+i,1 FONT textfont1 ACTION {||w_order(3),oBrowse:RefreshAll()}
...
...
DCHOTKEY xbeK_F1 ACTION {||hpshelp()} // 28
DCHOTKEY xbeK_F2 ACTION {||w_order(1),oBrowse:RefreshAll()} // -1
DCHOTKEY xbeK_F3 ACTION {||w_order(2),oBrowse:RefreshAll()} // -2
DCHOTKEY xbeK_F4 ACTION {||w_order(3),oBrowse:RefreshAll()} // -4
DCHOTKEY xbeK_F5 ACTION {||w_order(4),oBrowse:RefreshAll()} // -5
DCREAD GUI FIT TO lStatus TITLE cTitle OPTIONS GetOptions ENTEREXIT HANDLER MyHandler4 REFERENCE @oBrowse
RETURN lstatus
FUNCTION MyHandler4 (nEvent,mp1,mp2,oXbp,oDlg,GetList,oBrowse)
do case
case nEvent = xbeP_Keyboard .and. Upper(Chr(mp1)) = "S"
aufsuches()
obrowse:refreshall()
case nEvent = xbeP_Keyboard .and. mp1= 13 // Enter
return DCGUI_EXIT_OK
case nEvent = xbeP_Keyboard .and. mp1= 27 // ESC
esca=.t.
return DCGUI_EXIT_ABORT
endcase
RETURN DCGUI_NONE
in this DCBROWSE-Window, I want to be able to use the PUSHBUTTON CAPTION "F4 Projekt "...
that's ok
but also the DCHOTKEY CAPTION "F4 Projekt". That's ok as long as I don't use the line
case nEvent = xbeP_Keyboard .and. Upper(Chr(mp1)) = "S"
in function myhandler4
if I could adress the F4-key in myhandler4,it would even be better but i dont't noch the value of mp1
thanks
@ 3,2 DCBROWSE oBrowse EDIT xbeBRW_ItemSelected MODE DCGUI_BROWSE_EDITEXIT ; //PARENT oTabPage1
DATA cAlias SIZE wcol,wrow FONT feldfont
DCBROWSECOL FIELD &felder1 WIDTH 6 ; //felder[1] ;
HEADER feldub1 PARENT oBrowse
...
....
@ wrow+vv, 1+hv DCPUSHBUTTON CAPTION "F1 Hilfe" SIZE 12+i,1 FONT textfont1 ACTION {||hpshelp()}
@ wrow+vv, 16+hv+i*1 DCPUSHBUTTON CAPTION "F2 Vorgang" SIZE 12+i,1 FONT textfont1 ACTION {||w_order(1),oBrowse:RefreshAll()}
@ wrow+vv, 31+hv+i*2 DCPUSHBUTTON CAPTION "F3 Kurzname" SIZE 12+i,1 FONT textfont1 ACTION {||w_order(2),oBrowse:RefreshAll()}
@ wrow+vv, 46+hv+i*3 DCPUSHBUTTON CAPTION "F4 Projekt" SIZE 12+i,1 FONT textfont1 ACTION {||w_order(3),oBrowse:RefreshAll()}
...
...
DCHOTKEY xbeK_F1 ACTION {||hpshelp()} // 28
DCHOTKEY xbeK_F2 ACTION {||w_order(1),oBrowse:RefreshAll()} // -1
DCHOTKEY xbeK_F3 ACTION {||w_order(2),oBrowse:RefreshAll()} // -2
DCHOTKEY xbeK_F4 ACTION {||w_order(3),oBrowse:RefreshAll()} // -4
DCHOTKEY xbeK_F5 ACTION {||w_order(4),oBrowse:RefreshAll()} // -5
DCREAD GUI FIT TO lStatus TITLE cTitle OPTIONS GetOptions ENTEREXIT HANDLER MyHandler4 REFERENCE @oBrowse
RETURN lstatus
FUNCTION MyHandler4 (nEvent,mp1,mp2,oXbp,oDlg,GetList,oBrowse)
do case
case nEvent = xbeP_Keyboard .and. Upper(Chr(mp1)) = "S"
aufsuches()
obrowse:refreshall()
case nEvent = xbeP_Keyboard .and. mp1= 13 // Enter
return DCGUI_EXIT_OK
case nEvent = xbeP_Keyboard .and. mp1= 27 // ESC
esca=.t.
return DCGUI_EXIT_ABORT
endcase
RETURN DCGUI_NONE
quiet old but still young and unskilled in express++
Re: xebK_F4 doesn't work correctly
This anomoly is caused by the Chr() function.
Chr(xbeK_F4) returns "s"
You can fix this as follows:
Chr(xbeK_F4) returns "s"
You can fix this as follows:
Code: Select all
case nEvent = xbeP_Keyboard .and. Upper(Chr(mp1)) = "S" .and. mp1 # xbeK_F4
The eXpress train is coming - and it has more cars.
- obelix
- Posts: 48
- Joined: Tue Dec 03, 2013 7:44 am
- Location: Villingen-Schwenningen, Black Forest, Germany
Re: xebK_F4 doesn't work correctly
ok, it works.
thank you Roger
thank you Roger
quiet old but still young and unskilled in express++
Re: xebK_F4 doesn't work correctly
instead of CHR()you can do same with ASC()
Code: Select all
Upper(Chr(mp1)) = "S"
Code: Select all
CASE nEvent = xbeP_Keyboard .and. mp1 = ASC("s")
greetings by OHR
Jimmy
Jimmy
Re: xebK_F4 doesn't work correctly
Hi,
Better look at ACCELKEY parameter for the dcpushbutton. Now you have your code twice in you sources. With the accelerator key you don't need to do this.
Better look at ACCELKEY parameter for the dcpushbutton. Now you have your code twice in you sources. With the accelerator key you don't need to do this.
Code: Select all
@ wrow+vv, 1+hv DCPUSHBUTTON CAPTION "F1 Hilfe" SIZE 12+i,1 FONT textfont1 ACTION {||hpshelp()} ACCELKEY xbeK_F1
- obelix
- Posts: 48
- Joined: Tue Dec 03, 2013 7:44 am
- Location: Villingen-Schwenningen, Black Forest, Germany
Re: xebK_F4 doesn't work correctly
thank you for your suggestions.
the addition of «.and. mp1 # xbeK_Fx» is necessary for all Fx-key, but it works.

the addition of «.and. mp1 # xbeK_Fx» is necessary for all Fx-key, but it works.
quiet old but still young and unskilled in express++