This project is read-only.
1
Vote

columnChooserForm is positioned partly outside of the Screen

description

When the list is positioned on the right of the screen and the "Columns"-button is clicked, the appearing form is positioned too far to the right. As a fix, change

    public void ShowColumnChooser(Point pt)
    {
        AvailableSectionsForm columnChooserForm = CreateAvailableSectionsForm();
        columnChooserForm.ColumnList = _listControl.Columns;
        columnChooserForm.Location = pt;
        columnChooserForm.Show(_listControl);

}

to

    public void ShowColumnChooser(Point pt)
    {
        AvailableSectionsForm columnChooserForm = CreateAvailableSectionsForm();
        columnChooserForm.ColumnList = _listControl.Columns;
        pt.X = Math.Min(pt.X, Screen.FromPoint(pt).WorkingArea.Right - columnChooserForm.Width);
        pt.Y = Math.Min(pt.Y, Screen.FromPoint(pt).WorkingArea.Bottom - columnChooserForm.Height);
        columnChooserForm.Location = pt;
        columnChooserForm.Show(_listControl);

}

comments