How to Force a redraw of the Editor [message #331491] |
Wed, 10 September 2008 08:38  |
Eclipse User |
|
|
|
I am using a custom editor. I have some preference that change the Editor's UI. I want to be able to force the editor to redraw when those options are selected (when the apply button in the preference page is selected for example)
|
|
|
Re: How to Force a redraw of the Editor [message #331492 is a reply to message #331491] |
Wed, 10 September 2008 09:59   |
Eclipse User |
|
|
|
peterM wrote:
> I am using a custom editor.
What kind of editor?
Dani
> I have some preference that change the Editor's UI. I want to be able to force the editor to redraw when those options are selected (when the apply button in the preference page is selected for example)
>
|
|
|
Re: How to Force a redraw of the Editor [message #331582 is a reply to message #331492] |
Fri, 12 September 2008 07:30   |
Eclipse User |
|
|
|
Well unfortunately it's not a text editor. As i said it's a custom editor that has several Composites in it with tables in them. I have created a preference page that has the options to hide or show the Composites. I want to force the editor to redraw when the Apply button is pressed. The editor is itself a Composite with a FormLayout set. I am invoking the Parent composite's redraw() as well as the redraw() methods of all the child Composites. I've found out something else as well. The redraw() methods are actually doing something the changes are there, but become visible only if i resize the parent Composite. I was wondering how is it posible to invoke the same mechanism that repaints the parent Composite without having to resize it?
Thanks,
Peter
|
|
|
Re: How to Force a redraw of the Editor [message #331602 is a reply to message #331582] |
Fri, 12 September 2008 13:47   |
Eclipse User |
|
|
|
Originally posted by: eclipse-news.rizzoweb.com
peterM wrote:
> Well unfortunately it's not a text editor. As i said it's a custom
> editor that has several Composites in it with tables in them. I have
> created a preference page that has the options to hide or show the
> Composites. I want to force the editor to redraw when the Apply
> button is pressed. The editor is itself a Composite with a FormLayout
> set. I am invoking the Parent composite's redraw() as well as the
> redraw() methods of all the child Composites. I've found out
> something else as well. The redraw() methods are actually doing
> something the changes are there, but become visible only if i resize
> the parent Composite. I was wondering how is it posible to invoke the
> same mechanism that repaints the parent Composite without having to
> resize it? Thanks, Peter
I don't think you want to use redraw() at all, that is pretty low-level.
Since you're using layouts (smart man), you can just call layout() on
the parent Composite(s) that contain the ones you've shown/hidden.
Hope this helps,
Eric
|
|
|
|
Powered by
FUDForum. Page generated in 0.03491 seconds