Page 1 of 1

Default getoptions saysize for checkbox

Posted: Sun May 15, 2016 3:39 am
by c-tec
Hello,
it seems that setting sayfont in DC_GetOptDefault() does not effect the font in checkboxes, see attached screenshot. Is this a but or can I set the font with another setting ?
regards
Rudolf

Re: Default getoptions saysize for checkbox

Posted: Sun May 15, 2016 12:59 pm
by rdonnay
The SAYFONT clause only affects objects of @ .. DCSAY or @ .. DCSAY .. GET.

Re: Default getoptions saysize for checkbox

Posted: Wed May 18, 2016 11:14 pm
by c-tec
Hello Roger,
would be great if this setting effects all dialog elements. Its also strange that checkboxes are always some pixels too low positioned.
regards
Rudolf

Re: Default getoptions saysize for checkbox

Posted: Thu May 19, 2016 12:08 am
by Tom
would be great if this setting effects all dialog elements.
Oh no, please don't add this. It would destroy existing GUI layouts.

Re: Default getoptions saysize for checkbox

Posted: Thu May 19, 2016 8:05 am
by rdonnay
Oh no, please don't add this. It would destroy existing GUI layouts.
I would not do that to you Tom.

Re: Default getoptions saysize for checkbox

Posted: Thu May 19, 2016 8:08 am
by rdonnay
would be great if this setting effects all dialog elements. Its also strange that checkboxes are always some pixels too low positioned.
It might be great for you, but it would cause a nightmare for me. Am I right Tom?

If you want to control it with the SAYFONT try this:

@ .. DCCHECKBOX myCheckBox PROMPT ''
@ DCGUI_ROW, DCGUI_COL + 10 DCSAY 'This is my Checkbox Prompt' SAYSIZE 0

Re: Default getoptions saysize for checkbox

Posted: Thu May 19, 2016 10:19 pm
by c-tec
Hello Roger,
thank you, this is a solution for me
regards
Rudolf

Re: Default getoptions saysize for checkbox

Posted: Fri May 20, 2016 12:43 am
by Tom
Remember a WHEN-clause must be added to both, the box and the static in that situation. Otherwise, only the box would be disabled, which is hard to recognize.

Re: Default getoptions saysize for checkbox

Posted: Fri May 20, 2016 5:41 am
by rdonnay
You also need to respond to mouse clicks on the say. See below.

Code: Select all

#INCLUDE "dcdialog.CH"
#INCLUDE "appevent.CH"

FUNCTION Main()

LOCAL GetList[0], lCheck := .f., oCheck

@ 0,0 DCCHECKBOX lCheck PROMPT '' OBJECT oCheck

@ DCGUI_ROW, DCGUI_COL DCSAY 'This is a checkbox' SAYSIZE 0 SAYBOTTOM ;
   EVAL {|o|o:lbUp := {|a,b,o|oCheck:setData(!oCheck:getData())}}

DCREAD GUI FIT ADDBUTTONS TITLE 'Checkbox with SAY'

RETURN nil

* ---------

PROC appsys ; RETURN