Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Microsoft: FoxPro FAQ


How can I 'grey out' a grid? by ChrisRChamberlain
Posted: 26 Nov 03 (Edited 27 Nov 03)

If you want to disable and show a grid 'greyed out', the default .DisabledBackColor for a textbox is white, while you perhaps run an external application or something similar, try the following code.

The default .DisabledBackColor for a textbox is white
You will need to replace the various values with those relevant to your application.

You will also need to change the .DisabledBackColor property of any checkboxes you may have in a column(s) to say RGB(128,128,128) to prevent white showing as the background colour.

The example shows the selected row highlighted and these values will also need examining.

    .SetAll([DynamicBackColor]    ,;
           "IIF(RECNO([TABLENAME]) = THISFORM.nRecNo    ,;
            RGB(212,208,200)    ,;
            RGB(212,208,200))"    ,;
    .SetAll([DynamicForeColor]    ,;        
           "IIF(RECNO([TABLENAME]) = THISFORM.nRecNo    ,;
            RGB(128,128,128)    ,;
            RGB(128,128,128))"    ,;
    .Enabled = .F.

* Run other process and then enable grid

       .SetAll([DynamicBackColor]    ,;
           "IIF(RECNO([TABLENAME]) = THISFORM.nRecNo    ,;
            RGB(10,36,106)        ,;
            RGB(255,255,255))"    ,;
    .SetAll([DynamicForeColor]    ,;
           "IIF(RECNO([TABLENAME]) = THISFORM.nRecNo    ,;
            RGB(255,255,255)    ,;
            RGB(0,0,0))"        ,;
    .Enabled = .T.

Have fun!

Back to Microsoft: FoxPro FAQ Index
Back to Microsoft: FoxPro Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close