TGUI Forum

General Category => Help requests => Topic started by: sors on 09 June 2021, 20:42:17

Title: ToolTip Auto Position On Screen
Post by: sors on 09 June 2021, 20:42:17
Hello, tell me please how i can set automatic position ToolTip on Button.
In this time i have a ToolTip crawling out from window.
Title: Re: ToolTip Auto Position On Screen
Post by: texus on 09 June 2021, 22:40:19
It's currently not possible.
I might have a look at implementing this in the next few days. It doesn't look that difficult, I think this line (https://github.com/texus/TGUI/blob/0.9/src/GuiBase.cpp#L489) just has to check if the position plus size of the tooltip is larger than the size of m_view.
Title: Re: ToolTip Auto Position On Screen
Post by: texus on 11 June 2021, 19:42:23
The TGUI version from github (https://github.com/texus/TGUI/) now places the tool tip so that it doesn't fall (partially) outside the window.