Hello, can someone help me with problem in a custom widget when moving window 
Author Message
 Hello, can someone help me with problem in a custom widget when moving window

Hello.
I made a custom widget that links to a specific object from a visualization
toolkit.
This a very simple widget because it doesn't really draws anything by
itself, all is made through the toolkit object.
Some methods of this object will redraw it immediately.
For instance, in the mouse move event I call the method "MoveTo(x,y)" from
this object witch will show an axis and highlight objects under the cursor.
It works almost fine but...when I move the top window and then move the
mouse over the widget I get an image of this widget in the previous
position. Its just a static image, then the redraws change again to the
widget location.

Could this have something to do with the fact that "Tcl_DoWhenIdle" isn't
called to manage the redisplay in this move event?

Can someone give me some advice?
Thanks a lot



Wed, 10 Mar 2004 09:25:43 GMT  
 Hello, can someone help me with problem in a custom widget when moving window
Hello again.
I managed to fix it. Although I don't think this is the best way I solved it
by calling a redisplay in leave event.
Thanks anyway.


Quote:
> Hello.
> I made a custom widget that links to a specific object from a
visualization
> toolkit.
> This a very simple widget because it doesn't really draws anything by
> itself, all is made through the toolkit object.
> Some methods of this object will redraw it immediately.
> For instance, in the mouse move event I call the method "MoveTo(x,y)" from
> this object witch will show an axis and highlight objects under the
cursor.
> It works almost fine but...when I move the top window and then move the
> mouse over the widget I get an image of this widget in the previous
> position. Its just a static image, then the redraws change again to the
> widget location.

> Could this have something to do with the fact that "Tcl_DoWhenIdle" isn't
> called to manage the redisplay in this move event?

> Can someone give me some advice?
> Thanks a lot



Wed, 10 Mar 2004 10:07:13 GMT  
 Hello, can someone help me with problem in a custom widget when moving window
        ...

Quote:
> It works almost fine but...when I move the top window and then move the
> mouse over the widget I get an image of this widget in the previous
> position. Its just a static image, then the redraws change again to the
> widget location.

Make sure that the event handler has ExposureMask added, and
that you handle repaint on expose events.

--
  Jeff Hobbs                     The Tcl Guy
  Senior Developer               http://www.ActiveState.com/
      Tcl Support and Productivity Solutions



Wed, 10 Mar 2004 10:51:32 GMT  
 Hello, can someone help me with problem in a custom widget when moving window
Thanks Jeffrey.

Can you help me with another thing?
I'm trying to draw a border around this widget whenever it has focus.
I used "XDrawRectangle" but then this border is inside the widgets window
witch causes some flickering.
I can only make the visualization object redraw in the entire window.
I'm trying to use "Tk_SetWindowBorderWidth" that I think draws a border
outside the tk_window.
Is this right?
I tried it but the widget seems a little dislocated. Only two sides of the
border are visible.
Another thing is that this border is the same color as the background.
I used "Tk_SetWindowBorder" but nothing happens.

Can you give me some lights on this?

Thanks a lot.


Quote:

> ...
> > It works almost fine but...when I move the top window and then move the
> > mouse over the widget I get an image of this widget in the previous
> > position. Its just a static image, then the redraws change again to the
> > widget location.

> Make sure that the event handler has ExposureMask added, and
> that you handle repaint on expose events.

> --
>   Jeff Hobbs                     The Tcl Guy
>   Senior Developer               http://www.ActiveState.com/
>       Tcl Support and Productivity Solutions



Wed, 10 Mar 2004 22:43:38 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Problem encounterd in porting custom widget from VW 1.0 to 2.0

2. can someone help me with some widget issues

3. looking for someone to write a custom driver for a TDC

4. Hello Could someone please give me a hand with OraTcl

5. problem with moving widgets on a canvas

6. Report problems with custom Windows header.

7. Problem combining reports with custom Windows header.

8. Problems combining Reports with Custom Windows Company Header.

9. Hello. Can someone help me with hobbs console widget?

10. logo problem...can someone help?

11. Protected Mode Init Problem: Can someone help?

12. Can someone please help a Newbie with a redirection problem

 

 
Powered by phpBB® Forum Software