On Tue, Jun 16, 2009 at 7:14 PM, Darwin Reynoso<
monouser@...> wrote:
> ok i got it. thank you Chris
>
> here is what i did.
>
> void setColor()
> {
>
> colorDialog = new ColorSelectionDialog("select color");
>
>
>
> if(colorDialog.Run()==(int)ResponseType.Ok)
> {
> selected = colorDialog.ColorSelection;
>
> textview1.ModifyText(StateType.Normal,selected.CurrentColor);
>
> }
> colorDialog.Destroy();
>
> }
Is "selected" a class-level variable? If it is, you should either
change it to something else, like a Gdk.Color, and store the color
directly on it, or set it to null after calling colorDialog.Destroy().
Calling Destroy on a container widget, like a dialog, destroys all of
its children too, and using "selected" after this point would be a bad
thing.
--
Chris Howie
http://www.chrishowie.comhttp://en.wikipedia.org/wiki/User:Crazycomputers_______________________________________________
Gtk-sharp-list maillist -
Gtk-sharp-list@...
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list