[Gtk-sharp-list] size request getting lost...
Christian Hoff
christian_hoff at gmx.net
Mon Feb 23 09:08:29 EST 2009
Stanis?aw Pitucha schrieb:
> 2009/2/23 Christian Hoff <christian_hoff at gmx.net>:
>
>> Have a look at the Size.cs sample in the Gtk# repository. The event
>> handler shopuld not call SetSizeRequest, but instead modify the
>> Requisition object in the args param:
>>
>> static void Size_Requested (object obj, SizeRequestedArgs args)
>> {
>> Requisition req = args.Requisition;
>> Console.WriteLine ("Requesting 100 x 100");
>> req.Width = req.Height = 100;
>> args.Requisition = req;
>> }
>>
>
> Does it mean that the example in go-mono is wrong?
> http://go-mono.com/docs/index.aspx?tlink=3@ecma%3a721%23Bin%2f
>
I think so. Somebody should change it. There was a bug in earlier
versions of Gtk# because the requisition got lost if you manipulated it.
This was probably the reason why the sample in the Mono docs uses this
workaround.
More information about the Gtk-sharp-list
mailing list