Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » EditorPart: getClientArea() before Control is painted
EditorPart: getClientArea() before Control is painted [message #1062957] Tue, 11 June 2013 10:20
some coder is currently offline some coder
Messages: 1
Registered: June 2013
Junior Member
Hello,

i have a Eclipse RCP application (for Eclipse 3.2). Now i am converting the application to Eclipse 4.2. Today i found a "new Bug" in my app which occurs because of different behaviour in Eclipse 4.2.

1. In my app i have a case where i create a editor which extends the EditorPart class.
2. This editor class creates a canvas in the createPartControl() function
3. later (after opening the editor with WorkbenchPage.openEditor) i create a BIRT chart.
4. after that the canvas draws the chart if the paint event occurs.

My problem is that i need to know the size of the client area of the canvas in step 3 before creating the chart. but i found that canvas.getClientArea() returns {0,0,0,0} if the paint event hasn't been fired.

So does anybody know how to get the size of the client area of a canvas (which is part of a EditorPart-class) befor it is drawn? I hope i could explain my problem.
Previous Topic:WindowBuilder Bug. Control position in Designer View is opposite
Next Topic:If I create clones of a perspective, can I make them independent of each other?
Goto Forum:
  


Current Time: Wed Aug 27 17:20:41 EDT 2014

Powered by FUDForum. Page generated in 0.02007 seconds