Re: Programmatic control of Toolbar Items: ComboBox possible?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: Programmatic control of Toolbar Items: ComboBox possible?

Matthias B.-2
On 9/23/05, Carsten Driesner <[hidden email]> wrote:

> Matthias Benkmann wrote:
> > That did the trick. Thanks for all your help so far. Now there's just
> > one little cosmetic thing: How do we specify the size of the ComboBox
> > so that it scales with the system font. Currently we're supplying
> > absolute pixel values.
> Hi Matthias,
> the OOo toolbar implementation scales all item windows automatically.
> Unluckily there is no API which gives you a notification when the user
> has changed the UI system font. The best solution I am aware of is, try
> to determine which system font is used for the combo box. Use the font
> metric information to set a generic width which is appropriate for your
> needs.

Thanks. The width aspect is okay now. But what about the height? I'd
like to have my ComboBox always have the same height as the ComboBoxes
OOo has by default, such as the font selector. I could empirically
determine a factor to multiply the font height with that results in
the size being the same as the font selector, but that doesn't seem
like a robust solution. How does the font selector ComboBox determine
its height? Is there a formula I can copy?  Maybe a pointer to the
appropriate source file and method in the OOo sources where the height
is computed for the font selector could help me.



To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]