Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different color for proposed values? #152

Open
chowbok opened this issue Mar 2, 2025 · 1 comment
Open

Different color for proposed values? #152

chowbok opened this issue Mar 2, 2025 · 1 comment

Comments

@chowbok
Copy link

chowbok commented Mar 2, 2025

Would it be possible to have a different color for proposed values, instead of gray? It's hard to tell the gray from the black sometimes, especially if it's only one character. Or maybe use italics?

@maforget
Copy link
Owner

maforget commented Mar 2, 2025

I am sure it is doable, but would require changing how the text is set. Right now it is done via a Windows API. It is using this technique: https://stackoverflow.com/questions/11873378/adding-placeholder-text-to-textbox/22405509#22405509

public static void SetCueText(this TextBox tb, string text)
{
Native.SendMessage(tb.Handle, Native.EM_SETCUEBANNER, IntPtr.Zero, text);
}

Changing the text would require modifying the code to just changing the text itself and setting the Font Properties accordingly and making sure to have a way of tracking if the value is proposed or not and not pass a proposed value as a changed value.

It is possible but the current solution is way more elegant and the alternative is more prone to errors. Since it is done via the OS maybe there is an way to change this font via the OS. Don't know the implication for a dark mode #2 and how it would be affected using the new dark mode in .NET 9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants