I just noticed that GET clauses do not grey out when the WHEN clause is false. COMBOBOXes are greyed as expected. I'm pretty sure that this did work this way at one time.
For example:
@ 1, 1 GET oCalldate VAR cCallDate WHEN ( .F. ) OF oDlg
does not show the field greyed out.
Does anyone else see this issue?
I am using xBase ver 1.9 RC2.
Dan
Gets not Greyed when WHEN is false
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
-
- Posts: 28
- Joined: Wed Nov 09, 2005 11:46 am
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Dan,
If you use a WHEN clause to disable them, then you can do it from there:
If this makes your code more complex, we may look to implement a way to let colors default as with previous versions. Many users were requiring to change the color of disabled GETs as they are hardly visible.
If you use a WHEN clause to disable them, then you can do it from there:
Code: Select all
... GET oGet VAR ... WHEN ( lEnable := ValidCondition(), If( lEnable, oGet:SetColor( nColor1, nColor2 ), oGet:SetColor( nColor3, nColor4 ) ), lEnable )
-
- Posts: 28
- Joined: Wed Nov 09, 2005 11:46 am
Hello Antonio,
It does make the code a bit unreadable. What about a global setting that will set the colors of all disabled gets to specific colors? The user could override any get then for a unique purpose or even change the global setting for disabled gets to other colors. The gets could inherit the default setting when a dialog is activated and be changed when necessary for specific purposes for each get while the dialog is activated.
I really prefer the greyed out gets the way they were, but I do understand that some users would find them hard to read.
Dan
It does make the code a bit unreadable. What about a global setting that will set the colors of all disabled gets to specific colors? The user could override any get then for a unique purpose or even change the global setting for disabled gets to other colors. The gets could inherit the default setting when a dialog is activated and be changed when necessary for specific purposes for each get while the dialog is activated.
I really prefer the greyed out gets the way they were, but I do understand that some users would find them hard to read.
Dan
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Dan,
We have implemented a new DATA in class TGet, named lDisColors, that it is .t. by default.
If lDisColors is .t. then the painting is standard as usual. If .f., then the GET colors are used.
You may review samples\TestGet2.prg to see how to use this new DATA. We email you the new libs and appreciate your feedback.
We have implemented a new DATA in class TGet, named lDisColors, that it is .t. by default.
If lDisColors is .t. then the painting is standard as usual. If .f., then the GET colors are used.
You may review samples\TestGet2.prg to see how to use this new DATA. We email you the new libs and appreciate your feedback.
-
- Posts: 28
- Joined: Wed Nov 09, 2005 11:46 am