Ejemplo n.º 1
0
        public void ScaleChildControl_VScrollBarTest()
        {
            using (var scrollBar = new VScrollBar {
                Width = 20, Height = 200
            })
            {
                OTBaseForm.ScaleChildControl(scrollBar, new SizeF(2.0f, 2.0f));

                Assert.Equal(40, scrollBar.Width);
            }
        }
Ejemplo n.º 2
0
        public void ScaleChildControl_ListViewTest()
        {
            using (var listview = new ListView {
                Width = 200, Height = 200
            })
            {
                listview.Columns.AddRange(new[]
                {
                    new ColumnHeader {
                        Width = 60
                    },
                    new ColumnHeader {
                        Width = 140
                    },
                });

                OTBaseForm.ScaleChildControl(listview, new SizeF(1.25f, 1.25f));

                Assert.Equal(75, listview.Columns[0].Width);
                Assert.Equal(175, listview.Columns[1].Width);
            }
        }
Ejemplo n.º 3
0
 protected override void ScaleControl(SizeF factor, BoundsSpecified specified)
 {
     base.ScaleControl(factor, specified);
     OTBaseForm.ScaleChildControl(this.scrollBar, factor);
 }