After the HILITE problem with Xbase2.0 and a windows scale of 125% I found the cause was passing the oDialog:drawingarea instead of oDialog, customers are complaining now they can't use the right button in a GET.

I can't find a way where everything is working correctly:
1. Hilite of GET on Windows of 125%.
2. Opening dialog has to be centered in the right part of the main dialog.
3. Default behaviour of right mouse click in a get to copy should work.
4. Selecting text of a get with the mouse should work.
These are not very special features in my opinion?
With the below sample you can simulate the problems.
First button with main dialog as parameter:
- Hilite is fine, both on 100 and 125%.
- Centering is wrong.
- Right mouse button and selecting of text is NOT working.
Second button with drawingarea as parameter.
- Hilite has wrong position at 125%.
- Centering is correct.
- Right mouse button and selecting of text is working.
Code: Select all
function hilitesample()
*********************
Local getlist := {} , oStartDialog , lOk := .F. , oLeftBar , getoptions := {}
DCSTATUSBAR oLeftbar WIDTH 300 ALIGN DCGUI_ALIGN_LEFT TYPE XBPSTATIC_TYPE_RAISEDBOX
@ 1,1 dcpushbuttonxp caption "Parameter;oStartDialog" size 20,3 ;
action {|| showdialog(oStartDialog)} parent oLeftbar
@ 7,1 dcpushbuttonxp caption "Parameter;Drawingarea" size 20,3 ;
action {|| showdialog(oStartDialog:drawingarea)} parent oLeftbar
DCGETOPTIONS WINDOWHEIGHT 600 ;
WINDOWWIDTH 920 ;
DCREAD GUI ADDBUTTONS to lOk PARENT @oStartDialog OPTIONS getoptions
return nil
Function showdialog(oParentDlg)
*******************************
Local getlist := {} , cVar := "Click right button to copy." , getoptions := {}
Local cVar2 := "Try to select text to copy."
@ 1,1 dcsay "Click right button to select:" get cVar sayright saysize 20 getsize 30
@ 3,1 dcsay "Try to select with mouse:" get cVar2 sayright saysize 20 getsize 30
DCGETOPTIONS HILITEGETS GRA_CLR_RED
DCREAD GUI FIT ADDBUTTONS APPWINDOW oParentDlg ;
EVAL {|o| DC_CenterObject(o) } OPTIONS getoptions
return nil