Jump to content

ComboBox - Change background and text color and or font


Recommended Posts

  • Moderators
Posted (edited)

Not trying to re-invent the wheel here, but I found some examples that did A-L-O-T that I didn't think was necessary (like forcing owner-drawn), the sparse number of the web examples were failing miserably too.  It looked like @argumentum was taking the path I was on, his is much more feature rich ( 😅 ) ... Anyway, I was going to add a font option using this subclass method (Thanks to @LarsJ for his subclass method, saved me some time) but I am out of time and if I don't post this now, I will probably forget to post it later (Yep, age is getting there).

@LarsJ - GUIRegisterMsg20 - 

@argumentum ComboBox Set DROPDOWNLIST Colors/size UDF (Lots-O-Stuff) 

Here's my short and sweet (I don't think I ever code anything short.. or sweet)

Edit 2024-04-10:

Added the font change functions, pay attention to the fact that there are 3 different hwnds, the control hwnd, the edit hwnd as well as the listbox hwnd for the combo box.  There are 4 functions, one changes all 3, the others change each of the other hwnds.

Edit-2 2024-04-10:
So I was going to use the forum members meticulous eyes to find issues, but I seemed to find a few that I didn't notice before myself.

- Wrong array bounds in font au3 was fixed
- Multi color (LB and Edit different colors) fixed (mistakenly used 1 brush ... oops) for color au3
- Missing edit color logic fixed for color au3

 

 

 

 

GUIComboBox.2024.04.10-002.zip

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • SmOke_N changed the title to ComboBox - Change background and text color and or font
  • Moderators

Updated, added the font changing functions.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

File is missing? 🤔

 

Edit:

Working Already.

Saludos

Edited by Danyfirex
Link to comment
Share on other sites

  • Moderators

Yeah, I was closing it out of SciTe when I noticed I had the wrong number of default elements in the return array... oops.

You must have went to download it when I was uploading the fix... sorry

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...