I have a very big problem with the get system. I am not able to create vertically aligned get lines with different objects.
I tried everything to find a solution, but I was not able to find any.
You can see the problem on the attached pictures.
My program is used by thousands, and I have to be flexible on every level. It must work from HD to 4K or higher resoulutions, small monitor to huge TV, in small window or maximized. I nave to be able to set the say and get fonts by the customer, to be able to find tha best for them.
With the default fonts and settings it works, but with different font sizes it is impossible to make the objects in a line to be vertically center aligned to the center of te line.
And my program looks very unprofessional in this cases. There is no straight lines of objects. One is lower or higher than the other, like on the picture here.
So I need a soulution to be able to put the objects vertically aligned in straight line.Not the bottom of the objects need to be aligned, the center of them.
I need a universal solution, that works on every font size, and rowsize. Similar to VCENTER or CENTER at the DCSAY object.
The DCSAY...GET and DCGET and DCCHECKBOX is the most important for me.
Maybe a new DCGETOPTIONS option , or a get/set function which turn this on and off could be a solution.
This is a test program:
Code: Select all
#INCLUDE "dcdialog.CH"
FUNCTION Main()
LOCAL GetList[0],getoptions, wget:="This is too low",wget2:="DCGET separately this is too high ",wget3:=wget2
local pSayFont:="10.Arial",pgetfont:="10.Lucida Console",wl:=.f.
@0,0 dcsay "DCSAY+GET" get wget saysize 0 SAYLEFTCENTER
@0,DCGUI_COL+10 DCPUSHBUTTON CAPTION "&Test" SIZE 10,1 ACTION {||test()}
@0,DCGUI_COL+10 dcsay "DCSAY" saysize 0 SAYLEFTCENTER
@0,DCGUI_COL+10 dcget wget2
@2,0 dcsay "DCSAY" saysize 0 SAYLEFTCENTER
@2,DCGUI_COL+10 dcget wget3
@2,DCGUI_COL+10 DCPUSHBUTTON CAPTION "&Test2" SIZE 10,1 ACTION {||test()}
@2,DCGUI_COL+10 DCCHECKBOX wl PROMPT "Checkbox always low"
DCGETOPTIONS fitpad 3 SAYFONT pSayFont GETFONT pGetFont FONT pSayFont ;
ROWSPACE 24 COLPIXELS 10 ROWPIXELS 24 SAYHEIGHT 24 ;
GETHEIGHT 15 // Change to 20 the DCGET separately looks what I want, but the DCSAY...GET not affected with this setting at all
// // Change GETHEIGHT to 24, and every get is low
DCREAD GUI FIT ADDBUTTONS TITLE 'Vertical alignment problem';
options getoptions EVAL {|o|SetAppWindow(o)}
RETURN nil
function test()
RETURN nil
PROC appsys ; RETURN
Zoltan