Skip to content

Conversation

PWagner1
Copy link
Contributor

@PWagner1 PWagner1 commented Sep 13, 2025

@giduac
Copy link
Contributor

giduac commented Sep 15, 2025

Will be testing during this week

Copy link
Contributor

@giduac giduac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PWagner1

A strange thing is that the InternalPanel is selectable. if you click that area. When the title-bar is clicked the KForm is selected. The latter should be the case when any part of the form is clicked, the form is selected in the properties window.

I cant see any improvement in this branch atm.
Also controls cannot be added, as was the case before.

devenv_hAwOMPRKTp.mp4

Please have this corrected before requesting a review.
Thanks.

@PWagner1
Copy link
Contributor Author

@PWagner1

A strange thing is that the InternalPanel is selectable. if you click that area. When the title-bar is clicked the KForm is selected. The latter should be the case when any part of the form is clicked, the form is selected in the properties window.

I cant see any improvement in this branch atm. Also controls )cannot be added, as was the case before.

devenv_hAwOMPRKTp.mp4
Please have this corrected before requesting a review. Thanks.

@giduac

I don't know why, but it seems to work correctly in some instances but not others...

@giduac
Copy link
Contributor

giduac commented Sep 16, 2025

@PWagner1
A strange thing is that the InternalPanel is selectable. if you click that area. When the title-bar is clicked the KForm is selected. The latter should be the case when any part of the form is clicked, the form is selected in the properties window.
I cant see any improvement in this branch atm. Also controls )cannot be added, as was the case before.
devenv_hAwOMPRKTp.mp4
Please have this corrected before requesting a review. Thanks.

@giduac

I don't know why, but it seems to work correctly in some instances but not others...

Why does the menu interfere with the controls area / internalPanel...

@PWagner1
Copy link
Contributor Author

@PWagner1
A strange thing is that the InternalPanel is selectable. if you click that area. When the title-bar is clicked the KForm is selected. The latter should be the case when any part of the form is clicked, the form is selected in the properties window.
I cant see any improvement in this branch atm. Also controls )cannot be added, as was the case before.
devenv_hAwOMPRKTp.mp4
Please have this corrected before requesting a review. Thanks.

@giduac
I don't know why, but it seems to work correctly in some instances but not others...

Why does the menu interfere with the controls area / internalPanel...

@giduac

That, I don't understand, as it never touches it?

@PWagner1
Copy link
Contributor Author

@giduac

Yesssssssssssssss......... fixed it!!!!!!!!!!!

@giduac
Copy link
Contributor

giduac commented Sep 17, 2025

@giduac

Yesssssssssssssss......... fixed it!!!!!!!!!!!

I'd like to take this a bit further.

  • Why does the themed menu react to (mouse) input that is not in the title-bar?
  • Another approach to look at: can the themed menu be made to not react to input while the form is in design mode. That can make the code in KInternalpanel redundant. And that code will run a lot since the panel is at the core of kform.

@giduac
Copy link
Contributor

giduac commented Sep 17, 2025

@PWagner1

And controls cant be added normally nor can they be moved across the form.
https://github.com/user-attachments/assets/ecaf5425-f95d-446f-9116-dff4c0d25912

@PWagner1
Copy link
Contributor Author

@PWagner1

And controls cant be added normally nor can they be moved across the form. https://github.com/user-attachments/assets/ecaf5425-f95d-446f-9116-dff4c0d25912

@giduac

This is pretty much of a hit and miss...

Screen.Recording.2025-09-17.084932.mp4

@giduac
Copy link
Contributor

giduac commented Sep 18, 2025

@PWagner1
And controls cant be added normally nor can they be moved across the form. https://github.com/user-attachments/assets/ecaf5425-f95d-446f-9116-dff4c0d25912

@giduac

This is pretty much of a hit and miss...

Screen.Recording.2025-09-17.084932.mp4

So disabling worked at designtime, nice.

There have been quite a few edits to try to get this fixed. Which most of those are likely unnecessary. So best is to clean all this out and get it nice and tidy. When going over the code I think there are also some stale code blocks.

After that I'd like to go over the code and have a look at the need for nullability on vars/instances to reduce null checks.
A question mark doesn't look like much but will result in a full null check under the hood. So there's a bit to gain here.

# EDIT:

Or maybe better take a new branch from Alpha to lose all the changes.
And add the part that turns the menu off...

And:

Since this all happens in the form instance the Form.DesignModeproperty can be used directly and don't need this code block.
Several (not all) components/controls have this property handy...

    /// <summary>
    /// Robust design mode detection that works both at design time and runtime.
    /// </summary>
    private bool IsInDesignMode()
    {
        // Multiple checks for robust designer mode detection
        return LicenseManager.UsageMode == LicenseUsageMode.Designtime ||
               Site?.DesignMode == true ||
               (Site?.Container?.Components?.OfType<Control>().Any(c => c.Site?.DesignMode == true) == true);
    }```

@PWagner1
Copy link
Contributor Author

@PWagner1
And controls cant be added normally nor can they be moved across the form. https://github.com/user-attachments/assets/ecaf5425-f95d-446f-9116-dff4c0d25912

@giduac
This is pretty much of a hit and miss...
Screen.Recording.2025-09-17.084932.mp4

So disabling worked at designtime, nice.

There have been quite a few edits to try to get this fixed. Which most of those are likely unnecessary. So best is to clean all this out and get it nice and tidy. When going over the code I think there are also some stale code blocks.

After that I'd like to go over the code and have a look at the need for nullability on vars/instances to reduce null checks. A question mark doesn't look like much but will result in a full null check under the hood. So there's a bit to gain here.

# EDIT:

Or maybe better take a new branch from Alpha to lose all the changes. And add the part that turns the menu off...

And:

Since this all happens in the form instance the Form.DesignModeproperty can be used directly and don't need this code block. Several (not all) components/controls have this property handy...

    /// <summary>
    /// Robust design mode detection that works both at design time and runtime.
    /// </summary>
    private bool IsInDesignMode()
    {
        // Multiple checks for robust designer mode detection
        return LicenseManager.UsageMode == LicenseUsageMode.Designtime ||
               Site?.DesignMode == true ||
               (Site?.Container?.Components?.OfType<Control>().Any(c => c.Site?.DesignMode == true) == true);
    }```

Not necessary, as systemmenu is now disabled at design time. That's what the code block is for.

@PWagner1 PWagner1 marked this pull request as ready for review September 19, 2025 06:56
@PWagner1 PWagner1 self-assigned this Sep 19, 2025
@PWagner1 PWagner1 added area:designer All issues related to the designer. area:toolkit All issues related to the toolkit components. version:100-lts All things to do with V100 LTS. assessment:highpriority These items have been assessed as high priority, extra attention is required. labels Sep 19, 2025
@PWagner1 PWagner1 added this to the Version 100 milestone Sep 19, 2025
@PWagner1
Copy link
Contributor Author

@Smurf-IV, @giduac & @tobitege

Now ready for review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:designer All issues related to the designer. area:toolkit All issues related to the toolkit components. assessment:highpriority These items have been assessed as high priority, extra attention is required. version:100-lts All things to do with V100 LTS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants