Populate Combo with Fontnames

r.harrison

It'll be fine (I think!)
Local time
Today, 00:24
Joined
Oct 4, 2011
Messages
134
Hi,

I'm looking to add a user settings functionality to my DB and wanted the user to be able to select which font, backcolor, forecolor Logo .... they want to see on there individual workstations.

What I need is to be able to create a combobox with a list of all the fontnames. Searched everywhere but can't find the code.

I'm assuming it'll look something like:

For each i in xxxx.fontnames
me.cbo_fonts.additem(i.name)
next

Any ideas?
 
Thanks for that, seems a little OTT for what I'm thinking. Maybe I'll just use a Value list of "Aerial";"Verdana";........ instead!

Thanks for the reply though!

You would have thought that a simple:

For each font in system.fonts

next

would be easier!
 
Yep, that's the way to go. Just a small limited list of fonts would do.
 
Seemed so simple in my head!

Also looked at creating a color selector form, but again I think a simple list of pre-defined 'Themes' is the easier option!

Although I'm sure VB has a color selector form built in. Anything like that for VBA?
 
It always does ;)

Nope, no colour picker in VBA. You will need to call the API.
 
Found an easier way.

1) Get a list of fonts off of Wikipedia
2) Put them as values in the ComboBox


Also on the color side, I went for 3 x sliders to adjust the R,G,B values

Simples!
 
Thanks Banana,

Interesting read, more than likely I'll be using this at some point soon.
 

Users who are viewing this thread

Back
Top Bottom