Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6881249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:05:01+00:00 2026-05-27T05:05:01+00:00

In Windows when a control is disabled it looks grayed out. What type of

  • 0

In Windows when a control is disabled it looks grayed out. What type of algorithm could be used to achieve this kind of effect?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T05:05:02+00:00Added an answer on May 27, 2026 at 5:05 am

    I don’t know how Windows does it, but if you’re looking for an example of how it is often done, check out Qt’s QPalette class (and in particular the screenshot in the QPalette::ColorRole section).

    What Qt does is choose colors to draw widget parts with based on ColorRoles, so e.g. there is a “Button” ColorRole which represents the color of the interior of a button. When the button wants to draw itself, it asks its QPalette object what color it should use for the Button ColorRole, and then it draws its interior using that color. The button holds one QPalette object for use with its normal-look and a second QPalette object for use with its disabled-look… and the colors specified by the disabled-look QPalette will typically tend more toward gray as opposed to the normal QPalette’s black/white (although it is up to the designer of the QStyle to decide what they should be).

    (of course the quick-and-dirty way to make a control look grayed-out would be to just average the red, green, and blue values of each color in the control with the red, green, and blue values of a medium-gray… but that trick won’t provide enough control to get you the exact look you want in all situations)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Take the method System.Windows.Forms.Control.Invoke(Delegate method) Why does this give a compile time error: string
I need to build a Windows control that displays KPI indicators. Something similar to
I use Visual Studio .NET to develop internal applications. I create a Windows control
The windows forms control library project (C++) I writes uses an unmanaged dll. The
I am creating a Windows Forms control derived from UserControl to be embedded in
I have a TreeView windows forms control with an ImageList , and I want
I've created a windows forms control, which is hosted in a web page viewable
I have written a control in C# that derives from System.Windows.Forms.Control. I have added
I'm writing a custom control derived from System.Windows.Forms.Control . The control is using the
does anyone know about a windows forms control that acts like the address bar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.