public ScrollableHandler() { Control = new CustomScrollable { Handler = this, Size = sd.Size.Empty, MinimumSize = sd.Size.Empty, BorderStyle = swf.BorderStyle.Fixed3D, AutoScroll = true, AutoSize = true, AutoSizeMode = swf.AutoSizeMode.GrowAndShrink }; Control.VerticalScroll.SmallChange = 5; Control.VerticalScroll.LargeChange = 10; Control.HorizontalScroll.SmallChange = 5; Control.HorizontalScroll.LargeChange = 10; content = new swf.Panel { Size = sd.Size.Empty, AutoSize = true, AutoSizeMode = swf.AutoSizeMode.GrowAndShrink }; Control.Controls.Add(content); }
public ScrollableHandler() { SkipLayoutScale = true; Control = new CustomScrollable { Handler = this }; this.Control.Size = SD.Size.Empty; this.Control.MinimumSize = SD.Size.Empty; Control.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; Control.AutoScroll = true; Control.AutoSize = true; //Control.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; Control.VerticalScroll.SmallChange = 5; Control.VerticalScroll.LargeChange = 10; Control.HorizontalScroll.SmallChange = 5; Control.HorizontalScroll.LargeChange = 10; //control.AutoScrollPosition = new SD.Point(0,0); //control.AutoScrollMinSize = new System.Drawing.Size(500,500); //control.DisplayRectangle = new System.Drawing.Rectangle(0,0,500,1000); //control.BackColor = System.Drawing.Color.Black; content = new SWF.Panel(); content.AutoSize = true; Control.Controls.Add(content); /* * Control.SizeChanged += delegate * { * if (Widget.Layout != null) * { * var layout = Widget.Layout.InnerLayout.Handler as IWindowsLayout; * if (layout != null && layout.LayoutObject != null) * { * var c = layout.LayoutObject as SWF.Control; * c.MinimumSize = new SD.Size(Control.ClientSize.Width, 0); * } * } * };*/ }