[Gtk-sharp-list] Help with widget not displaying in dialog

Andy Selvig ajselvig at gmail.com
Tue Apr 21 09:27:17 EDT 2009


Alan-

Sorry, I guess it's hard to tell without having the full code. I assume
there's a bunch of code that the Gtk# designer is creating that isn't really
obvious. In general, though, custom widgets need to be drawn on every expose
event. I'm guessing your problem has something to do with that.

-Andy

On Mon, Apr 20, 2009 at 6:28 AM, alan battersby <alan.battersby at ntlworld.com
> wrote:

> Andy Selvig wrote:
> > Alan-
> >
> > The drawing code (in FrameDisplay.DrawAxes()) should really called on
> > the expose event handler for FrameDisplay. This way, it will get
> > called whenever the control needs to be redrawn. Just put
> >
> > ExposeEvent += HandleExposeEvent;
> >
> > into the FrameDisplay constructor, then put a call to DrawAxes() in
> > the handler:
> >
> > void HandleExposeEvent(object o, Gtk.ExposeEventArgs args)
> > {
> >     DrawAxes();
> > }
> >
> > Hope this helps.
> >
> >
>
> Andy,
> I followed your suggestion as above but the display still keeps being
> cleared. In fact when I display the dialog just the drawing widget with
> drawing is displayed in the dialog, none of the other content is
> visible. Then after a short time the other controls
> (radiobuttons,buttons etc) appear and the drawing is cleared. So I have
> a initialisation problem of some sort but I dont know how to solve it.
>
> Alan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20090421/6fb9bf82/attachment.html 


More information about the Gtk-sharp-list mailing list