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

custom toolTip #694

Closed
wyj3531 opened this issue Jan 17, 2022 · 6 comments
Closed

custom toolTip #694

wyj3531 opened this issue Jan 17, 2022 · 6 comments
Assignees
Labels

Comments

@wyj3531
Copy link

wyj3531 commented Jan 17, 2022

image

@wyj3531
Copy link
Author

wyj3531 commented Jan 17, 2022

can i custom its style?Background, WebShape,Line,etc.
and how to remove the arrow ,it is also happen in WebComboBox.

@mgarin mgarin self-assigned this Jan 17, 2022
@mgarin
Copy link
Owner

mgarin commented Jan 17, 2022

can i custom its style?Background, WebShape,Line,etc.

Unfortunately custom tooltips style is currently not modifiable as it is hardcoded in WebCustomTooltip class.
It is listed in #476 and mentioned in #520 for future improvements.


and how to remove the arrow ,it is also happen in WebComboBox.

I recommend using simple Swing tooltips instead of the custom WebLaF ones if you don't want the positioning/arrow style - check the JToolTip section in demo:

image

You can also modify the JToolTip display via its style:
https://github.com/mgarin/weblaf/blob/master/modules/ui/src/com/alee/skin/light/resources/tooltip.xml

Unfortunately you can only change it's style globally as there is currently no way to change it on per-component basis. I've added a separate issue for that - #695 - which will be implemented in future versions.

@wyj3531
Copy link
Author

wyj3531 commented Jan 18, 2022

how about this arrow?
Uploading image.png…

@wyj3531
Copy link
Author

wyj3531 commented Jan 18, 2022

image

@mgarin
Copy link
Owner

mgarin commented Jan 19, 2022

Combobox popup menu can be adjusted via style.
Combobox style has a child style that is attached to it's popup menu:
https://github.com/mgarin/weblaf/blob/master/modules/ui/src/com/alee/skin/light/resources/combobox.xml#L90

You can create a custom style for combobox and adjust the popup style in it:

<style type="combobox" id="custom">
    <style type="popupmenu" id="popup">
        <painter>
            <popupStyle>simple</popupStyle>
        </painter>
    </style>
</style>

@wyj3531 wyj3531 closed this as completed Jul 14, 2022
@wyj3531
Copy link
Author

wyj3531 commented Jul 14, 2022

.

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