예제 #1
0
        private void ButtonClick(object sender, EventArgs e)
        {
            var height = objects == null
                              ? MinDropHeight
                              : (objects.Count + 1) * gridItemHeight;

            if (height < MinDropHeight)
            {
                height = MinDropHeight;
            }
            if (height > MaxDropHeight)
            {
                height = MaxDropHeight;
            }

            var location = PointToScreen(new Point(0, textBox.Bottom));
            var dlg      = new GridDropDialog(location.X, location.Y, Width, height,
                                              MinTableWidth, FixedTableWidth,
                                              CellBackColor, AltBackColor, FontColor,
                                              columns, objects, SelectedObject);

            dlg.gridObjectSelected += ObjectSelected;
            dlg.Show();
        }
예제 #2
0
        private void ButtonClick(object sender, EventArgs e)
        {
            var height = objects == null
                              ? MinDropHeight
                              : (objects.Count + 1) * gridItemHeight;
            if (height < MinDropHeight) height = MinDropHeight;
            if (height > MaxDropHeight) height = MaxDropHeight;

            var location = PointToScreen(new Point(0, textBox.Bottom));
            var dlg = new GridDropDialog(location.X, location.Y, Width, height,
                MinTableWidth, FixedTableWidth,
                CellBackColor, AltBackColor, FontColor,
                columns, objects, SelectedObject);
            dlg.gridObjectSelected += ObjectSelected;
            dlg.Show();
        }