You can set the SelectedIndex, however how can chose the correct font if I already have the font name? There doesn't seem to be a way to find the correct index to select?
Thanks,
Beardo
Hi,
So you've noticed the FontListTool doesn't seem to have these methods to support what you are after and I almost lost faith in the FontListTool but only for a moment; we can look at the class inheritance and notice that a FontListTool inherits from a ComboBoxTool. This class has what we need to do the operations you are after...
myFontListTool.Value = myFontListTool.ValueList.FindByDataValue("Bookman Old Style");
What is really happening is the FontListTool will be cast to a ComboBoxTool and the call will be valid. You can also cast it yourself to see all the properties and methods available.
So is there any particular reason that the ValueList property of the FontListTool is hidden in Intellisense?
It happens. Visual Studio's Intellisense fails to work as desired many times but most of the time it gets the job done and when inheritance is involved is usually where it fails... that's about all I'm going to say on that topic :).
Back to the original topic: is it all good now?
Yup, it's all good.