|
|
Re: changing fontsize during lifecycle [message #113017 is a reply to message #112995] |
Fri, 21 November 2008 08:31 |
Eclipse User |
|
|
|
Originally posted by: ifurnadjiev.innoopract.com
Hi,
switching the widget variant at runtime is possible. You can take a look
at the variant tab of the Control Demo.
Best,
Ivan
Stefan Roeck wrote:
> Hi Roland,
>
> this can be done using a PhaseListener.
>
> You can hook into After-Render-Phase and update your widgets. One
> possibility is to store the old font heights via setData with the
> widgets to determine if the font size has to been modified or not. See
> TextSizeDeterminationHandler for an example on how to iterate and
> update over the complete widget tree.
>
>
> Another possibility would be to create multiple themens with different
> font sizes and switch between them during runtime. However, I don't
> know, if that's supported yet. Ralf?
>
> Regards,
> Stefan.
>
> Roland Siebert schrieb:
>> Hi,
>>
>> is it possible to change the fontsize of all buttons and labels
>> during the lifecycle.
>>
>> In the moment i changed it per css, like this:
>> * {
>> font: normal 12px Verdana;
>> }
>>
>> But I want that user can change it.
>>
>> Roland
|
|
|
Re: changing fontsize during lifecycle [message #113029 is a reply to message #113017] |
Fri, 21 November 2008 09:23 |
Eclipse User |
|
|
|
Originally posted by: rsternberg.innoopract.com
Hi,
switching themes at runtime is currently not supported. If only the font
differs between the multiple themes, this would also involve a lot of
redundancy, I guess.
It's right, widget variants can be switched at runtime. But if you want
to go that way to change the font of every widget, you also have to
apply these variants to every widget. As a widget can only have a single
variant, this approach would prevent you from using variants for any
other purpose. To actually change fonts, you would have to change the
variant for all widgets, so you would save nothing compared to the
approach Stefan already outlined.
Don't forget to re-layout after switching fonts.
Best regards, Ralf
Ivan Furnadjiev wrote:
> Hi,
>
> switching the widget variant at runtime is possible. You can take a look
> at the variant tab of the Control Demo.
>
> Best,
> Ivan
>
> Stefan Roeck wrote:
>> Hi Roland,
>>
>> this can be done using a PhaseListener.
>>
>> You can hook into After-Render-Phase and update your widgets. One
>> possibility is to store the old font heights via setData with the
>> widgets to determine if the font size has to been modified or not. See
>> TextSizeDeterminationHandler for an example on how to iterate and
>> update over the complete widget tree.
>>
>>
>> Another possibility would be to create multiple themens with different
>> font sizes and switch between them during runtime. However, I don't
>> know, if that's supported yet. Ralf?
>>
>> Regards,
>> Stefan.
>>
>> Roland Siebert schrieb:
>>> Hi,
>>>
>>> is it possible to change the fontsize of all buttons and labels
>>> during the lifecycle.
>>>
>>> In the moment i changed it per css, like this:
>>> * {
>>> font: normal 12px Verdana;
>>> }
>>>
>>> But I want that user can change it.
>>>
>>> Roland
|
|
|
Powered by
FUDForum. Page generated in 0.05500 seconds