What system color to use to highlight required fields in delphi/windows - windows

a bit background
I am currently using the clHighlight color together with a StyleServices.GetSystemColor call to set the background color of controls that are:
not focused
have a NULL value (field.IsNull=True)
and are about a required field (field.required=True)
Its not about how to do the highlighting itself, I figured that out already.
Currently I am using system color clHighlight, but this makes confuses my users as they think the entire contents of the field is selected (see screenshot).
But I also have style support implemented, so using a custom predefined color is not really what I am looking for. after googling a bit I found quite a list here https://learn.microsoft.com/en-us/dotnet/api/system.windows.systemcolors?view=netframework-4.7.2 but I am unable to find what I am looking for.
Using RAD studio Rio 10.3.1 Enterprise.
The actual question
So - what system color should I use? (not really looking for subjective suggestions, but for a more or less "officially recommended" constant to use.)
a screenshot

Answer: There is no more or less system color constant defined for this specific purpose.
Solution/workaround:
Thanks all for the suggestions. I decided to go for the clInfoBk constant (background color for hint windows), this looks far less confusing. One could interpret the color as a "hint" for fields that need to be filled out.
And it looks like this, in the default color scheme:

Related

How do I retreive the background color from a control?

How can I retrieve the background color from a given control?
I'm looking for as general a solution as possible, including the default colors of a control. Is it possible to do this?
The closest I have gotten so far is the find of GetPixel(), but I realize it's far from a perfect solution. If I have text or something over the control -- that basically all controls have, it leads to the wrong result.

Change Intellisense Quick Info parameter font

Is it at all possible to change the font/colour of the parameter in the Intellisense Quick Info tooltip box? If there's a large number of parameters needed I just cannot see the bold sticking out enough in the dark theme. I can see it better with the light or blue theme enabled but I prefer the dark because it doesn't cause eye strain.
What I would like is to be able to change the "float g" to be more visible while leaving the other parameters in the list the same. So it could look more like this:
Color(float r, float g, float b)
Even if it's a bit of a hacky or roundabout way, I would just love to be able to change the size, colour or font.
I've checked through the font settings in VS but I can't find anything to specifically change what I want. I can make all of the Quick Info text bigger, but that doesn't really solve my problem.
Any suggestions would be great.
The feature I want isn't available in Visual Studio as of yet. I have a suggestion here:
https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/32216677-option-to-change-intellisense-quick-info-parameter
If you have the same problem or want the same thing please give it a vote.

How to set g:text style to bold font in a Windows Gadget?

I'm developing a Vista/Win7 Desktop Gadget that uses a translucent g:background (doc) area with g:text (doc) on top. I'm adding the text via addTextObject (doc), and this all works as expected.
However, I can't figure out how to set that text to bold style. There doesn't seem to be a way to do this directly via the exposed properties that I can see, and I can't use regular text + CSS in this case due to the fact this text is placed onto a g:background object.
I have also tried specifying a bold font directly, such as Arial Bold (doesn't work) instead of Arial (works).
So how can this be done?
Edit: I have tried setting font-weight:bold for both the body and the g:background object that parents my text; no luck.
See Flip Calendar, by Jonathan Abbott. His code is usually well commented so maybe you can get some ideas from that.
EDIT
The source of my information was from the early days of Vista Beta 2 where that was the official word from MS. I also found the following response to a thread on the MSDN forums regarding the Flip Calendar gadget itself:
http://social.msdn.microsoft.com/Forums/en-US/sidebargadfetdevelopment/thread/841e9d5e-32e9-453f-bd0e-dc5a4e607c33/
The gadget has options for setting bold font on the day of the month (a g:text object) but on closer inspection it doesn't work. Sorry about that. The MS guys have been known to be wrong as well on one or more occasions. I can honestly say that I don't use the g:text object.
This means your only (well, non activex route) option is VML text, which provides a lot of flexibility on layout. However, you will have to place it on a fully opaque area of the gadget which is probably why you wanted to use the addTextObject in the first place. Gary Beene's site really helped me out when I was getting started, but it doesn't go into any detail on the v:textbox element and the v:textpath element, though the MSDN documentation goes into enough detail on these.
If you need to place the text on a non-fully opaque area of the gadget, then you could still go the VML route and place an image behind the text that acts as a shadow, starting out fully opaque and fading to fully transparent. This is how Microsoft does text in window title bars with aero enabled.
Alternatively, you could create an ActiveXObject that draws the text you need in the font you want and saves the image to a temporary file in the gadget folder. Then you set that to the src of an addImageObject. I've done something similar in a gadget and it's fast enough not to be noticeable. You can also set min/max dimensions so shrinking/stretching to fit becomes a breeze.

Guidelines for application colors (background, buttons, etc.) on Windows?

What are the recommended colors for an application's background, button faces, etc.?
In the past I've just chosen a color scheme but I'd like to be more compatible with the Windows Accessibility Options, etc.
I see that VB6 has System Colors like Application Workspace.
Edit: I'd like to find an explanation of all of those colors (like what's the difference between Application Workspace and Window Background?
In my opinion, you should leave the colors as they are if you are using standard controls; they'll get the right color according to che current color scheme by themselves. You need to use the color constants only if you have to draw your own UI elements; in that case, the meaning of those constants is explained briefly in their documentation.
This PDF http://www.johnsmiley.com/cis18/Smiley009.pdf [ explanation of VB6 System Color values ]should help you. It lists all the system color constants and what they mean. For instance vbApplicationWorkspace is the "Background color of multipledocument interface (MDI) applications."
If you're interested in the whole MS Windows UI/UX guidelines, they are available online here and for download here. Page 618 deals with how to "Use theme or system Colors"
It depends on the language and framework you use. .Net for example has an entire SystemColors class full of static properties like SystemColors.Control that are 'changed' to the corresponding system color in runtime.
I think most office applications conform to the system colors, while most graphics intensive applications (e.g. games) use their own color scheme.
It is best if you try to use the colors of the current system (like the .NET SystemColors), that way if the user changes his settings (for example if he uses a high-contrast color scheme or some fancy black theme he likes) your application will adapt those colors and that way conforms to the users preferences/needs.

How to change Instantiated Objects Font Colour in Visual Studio

I know the colours are changed in Environment > Fonts and Colors but I haven't found out which Display Item the object is.
Can someone please tell how I can colour the following code:
lblMessage.Text = "You have successfully answered my question!"
I have the string coloured pink, I would like the lblMessage purple and the .Text a light green.
For me the darker the colour the less it will "change". I won't often change object names, I'll more often change properties and am always changing strings - although I have another question about this that I'll post later.
Thanks
Go to Environment > Fonts and Colors > Display Items and change
Identifier
String
I was hoping that their is I can be
more specific with the colours - if
their isn't then that's an acceptable
answer - just disappointing for me.
Yeah, I don't think you can do that. :)
This is possible if you use a 3rd party addin like Visual Assist. It lets you assign different colors to classes, variables, macros and functions (among other features).

Resources