Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to Force a redraw of the Editor
How to Force a redraw of the Editor [message #331491] Wed, 10 September 2008 08:38 Go to next message
Peter is currently offline PeterFriend
Messages: 14
Registered: July 2009
Junior Member
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 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
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 Go to previous messageGo to next message
Peter is currently offline PeterFriend
Messages: 14
Registered: July 2009
Junior Member
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 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: How to Force a redraw of the Editor [message #331609 is a reply to message #331602] Fri, 12 September 2008 19:44 Go to previous message
Peter is currently offline PeterFriend
Messages: 14
Registered: July 2009
Junior Member
Thanks, that helped :)
Previous Topic:startup ganymede slows down after renaming some plug-in projects
Next Topic:Tool to edit "solo" fragment in PDE ?
Goto Forum:
  


Current Time: Tue Jul 16 16:53:43 GMT 2024

Powered by FUDForum. Page generated in 0.03496 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top