the right way to update / refresh form Section's colors? [message #312161] |
Thu, 01 February 2007 13:56 |
Eclipse User |
|
|
|
Originally posted by: NOSAPM.xyz.com
Hi there,
I am trying to put together a UI based on forms. I use a ScrolledForm which
hosts several Sections
and Buttons.
The logic of the application requires that section's TitleBar colors be
changed when certain event happens.
From that event's handler I go:
oldSection.setTitleBarBackground (
toolkit.getColors().getColor( FormColors.TB_BG));
oldSection.setTitleBarGradientBackground ( toolkit.getColors().getColor(
FormColors.TB_GBG));
oldSection.layout( true);
oldSection.update();
newSection.setTitleBarBackground (
toolkit.getColors().getColor( TB_BG_ACTIVE));
newSection.setTitleBarGradientBackground ( toolkit.getColors().getColor(
TB_GBG_ACTIVE));
newSection.layout( true);
newSection.update();
.... where TB_BG_ACTIVE and TB_GBG_ACTIVE are the keys with which the
alternative
colors were registered with the FormColors of the form.
The problem is that nothing happens, the colors of these 2 sections remain
the same after the event.
The new colors appear if I expand / collapse the sections manually.
I got ambitious and tried to refresh the whole form like that:
secForm.reflow( true);
secForm.layout(true);
secForm.layout( update);
.... and still nothing changes ?!.
So what to do to refresh a section programmatically?
Thanks,
Theo
|
|
|
Powered by
FUDForum. Page generated in 0.03130 seconds