public AddChild ( Xwt.Widget w ) : void | ||
w | Xwt.Widget | /// The widget /// |
Результат | void |
public ScrollbarSample () { WidthRequest = 300; HeightRequest = 300; canvas = new Canvas (); label = new Label ("Use the scrollbars\nto move this label"); canvas.AddChild (label); Add (canvas, 0, 0, hexpand:true, vexpand:true); vscroll = new VScrollbar () { LowerValue = 0, UpperValue = 300, PageIncrement = 10, PageSize = 50, StepIncrement = 1 }; Add (vscroll, 1, 0, vexpand:true); hscroll = new HScrollbar () { LowerValue = 0, UpperValue = 300, PageIncrement = 10, PageSize = 50, StepIncrement = 1 }; Add (hscroll, 0, 1, hexpand:true); vscroll.ValueChanged += HandleValueChanged; hscroll.ValueChanged += HandleValueChanged; }