Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to implement this style, popup like popupmenu #687

Open
xcfdszzr opened this issue Dec 10, 2021 · 3 comments
Open

How to implement this style, popup like popupmenu #687

xcfdszzr opened this issue Dec 10, 2021 · 3 comments
Assignees
Labels

Comments

@xcfdszzr
Copy link

 this is popup

image

I want to make it popupMenu style

image

How am I going to do it
@mgarin
Copy link
Owner

mgarin commented Dec 13, 2021

If you mean that you want the corner to be displayed for your popup just like it is displayed for popupmenu component - I'm afraid that will be hard to implement.

Popup component doesn't keep or track the component it was opened relative to unlike popup menu. To display such corner you would need that information and a custom painter for the component that will make use of it.

So my recommendation in this case - if you absolutely need that corner to be displayed - simply use popup menu with custom content, it is a completely valid use of popup menu (although a bit unconventional).

Alternatively - use WebPopOver component, you can find a showcase for it in demo application:

image

The main difference between using popup menu and popover components would be that popover is basically a separate dialog that captures window focus, while popup menu is just a popup and it doesn't capture focus from your application window.

@mgarin mgarin self-assigned this Dec 13, 2021
@xcfdszzr
Copy link
Author

Thank you for your reply. I think I need to customize popup for this bug.

@mgarin
Copy link
Owner

mgarin commented Dec 30, 2021

Ultimately - I am considering two options in the future:

  • Get rid of WebPopOver and simply add all of it's functionality to WebPopup
  • Keep WebPopOver and allow it to be opened as frame/dialog/popup

Each solution has it's own pros and cons. Making WebPopup have all the functionality might make it convoluted and hard to use in some cases and will make it hard to modify in the future. And making WebPopOver have different display modes would introduce intersection between its functionality and WebPopup functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants