Gets not Greyed when WHEN is false

Gets not Greyed when WHEN is false

Postby Dan Landon » Wed Jan 04, 2006 11:58 am

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
Dan Landon
 
Posts: 28
Joined: Wed Nov 09, 2005 11:46 am

Postby Antonio Linares » Wed Jan 04, 2006 1:06 pm

Dan,

We have modified it intentionatelly. Now you can set any color you want for disabled GETs. Simply do oGet:SetColor( ..., ... ).
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42107
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Dan Landon » Thu Jan 05, 2006 11:48 am

How do I set the greyed color? I don't generally do anything with colors so I don't know anything about colors.

Dan
Dan Landon
 
Posts: 28
Joined: Wed Nov 09, 2005 11:46 am

Postby Antonio Linares » Thu Jan 05, 2006 12:29 pm

Dan,

If you use a WHEN clause to disable them, then you can do it from there:

Code: Select all  Expand view  RUN
   ... GET oGet VAR ... WHEN ( lEnable := ValidCondition(), If( lEnable, oGet:SetColor( nColor1, nColor2 ), oGet:SetColor( nColor3, nColor4 ) ), lEnable )


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.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42107
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Dan Landon » Thu Jan 05, 2006 11:49 pm

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
Dan Landon
 
Posts: 28
Joined: Wed Nov 09, 2005 11:46 am

Postby Antonio Linares » Mon Jan 09, 2006 7:40 am

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.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42107
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Dan Landon » Tue Jan 10, 2006 10:59 pm

Hello Antonio,

This implementation was a good idea. Works just fine.

Thanks
Dan
Dan Landon
 
Posts: 28
Joined: Wed Nov 09, 2005 11:46 am


Return to FiveMac / FivePhone (iPhone, iPad)

Who is online

Users browsing this forum: No registered users and 0 guests