FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveMac / FivePhone (iPhone, iPad) Gets not Greyed when WHEN is false
Posts: 28
Joined: Wed Nov 09, 2005 11:46 AM
Gets not Greyed when WHEN is false
Posted: 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

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Gets not Greyed when WHEN is false
Posted: Wed Jan 04, 2006 01: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
Posts: 28
Joined: Wed Nov 09, 2005 11:46 AM
Gets not Greyed when WHEN is false
Posted: 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

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Gets not Greyed when WHEN is false
Posted: Thu Jan 05, 2006 12:29 PM
Dan,

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

   ... 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
Posts: 28
Joined: Wed Nov 09, 2005 11:46 AM
Gets not Greyed when WHEN is false
Posted: 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

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Gets not Greyed when WHEN is false
Posted: Mon Jan 09, 2006 07: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
Posts: 28
Joined: Wed Nov 09, 2005 11:46 AM
Gets not Greyed when WHEN is false
Posted: Tue Jan 10, 2006 10:59 PM

Hello Antonio,

This implementation was a good idea. Works just fine.

Thanks
Dan

Continue the discussion