-
Notifications
You must be signed in to change notification settings - Fork 237
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
Position a popup window next to the caret (was: Get Caret position In Terms of Screen X and Y) #30
Comments
Hi Maher, What I might do is to add a property ObjectProperty<PopupWindow> popupAtCaretProperty(); which you could set to a popup window you want to position. The skin will observe the property and position the popup window next to the caret, by setting its anchorX and anchorY. You would still be responsible for showing and hiding the popup, all the skin would do is adjust the coordinates. What do you think? |
Hi Tomas, yes that would work. To confirm, it will allow me to load other Thanks for looking into This!
|
Yes, it would allow you to use any subclass of PopupWindow, which PopOver is. Hopefully I will get to this in the coming week. |
Awesome!
|
Hi Tomas,
It somehow works, but your solution sound better :-). Greetings , Roel |
Thanks for the workaround. Again, this solution is dependent on the skin implementation (ParagraphGraphic etc.). Although it is unlikely that anyone will write their custom skin for StyledTextArea et al., we should get it right anyway. |
Hi Roel, I found that work around too. But it does not seem to work
|
any news :) ? 🎱 |
Yes! See the source code of the above demo. |
Thanks! Will update the JAR right away! |
Yes! Work perfectly. Thanks! |
Hi Tomas, Would you be able to add a method to get the caret position in terms of screen X and Y? I have been trying to find a way to do this and came across only two examples, which kind of work, but not quite well. This is my post on Stack overflow.
http://stackoverflow.com/questions/22880996/caret-position-relative-to-screen-coordinates-in-javafx
It would be great if RichTextFX has such a method.
The text was updated successfully, but these errors were encountered: