Tool Tip does not show on MAC OSX

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
viveksha
Earned a small fee
Earned a small fee
Posts: 21
Joined: Tue Nov 20, 2012 7:07 am

Tool Tip does not show on MAC OSX

Post by viveksha » Tue Dec 18, 2012 5:15 am

Hello Everybody,
I have got a problem using wxWidgets. On windows lets say for wxListCtrl If the column size is less that the string then we show ... at the end and if we change the size of column we can see the whole string. In a different scenario if we mouse over to the string then it shows the whole string as tool tip on windows but on MAC this functionality is not there.
Could any one please let me know that is this any limitation in wxWidgets or i am doing anything wrong.
I am using wxWidgets 2.9 and my project is in C++.
Thanks and Regards,
Vivek

User avatar
doublemax
Moderator
Moderator
Posts: 15289
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Tool Tip does not show on MAC OSX

Post by doublemax » Tue Dec 18, 2012 11:18 am

I don't know about OSX, but i know that this is a feature of the native control under Windows. wxWidgets itself is not responsible for displaying those tooltips. So it's possible that the control that is used under OSX does not support it.
Use the source, Luke!

Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Re: Tool Tip does not show on MAC OSX

Post by Auria » Wed Dec 19, 2012 2:09 am

I think wxListCtrl is not a native control, this may be missing from the generic implementation maybe. If this can be reproduced in a small platform, and especially shown to behave differently from OS to OS, this is a case for bug report
"Keyboard not detected. Press F1 to continue"
-- Windows

viveksha
Earned a small fee
Earned a small fee
Posts: 21
Joined: Tue Nov 20, 2012 7:07 am

Re: Tool Tip does not show on MAC OSX

Post by viveksha » Wed Dec 19, 2012 6:46 am

Hi Guys,
My code is same for both Win and MAC but the tool tip appears on Win but does not appears on MAC .
The users of my projects say that this is a discrepancy between platform which should not be there. That is why i just wanted to know that this is platform/widgets limitation on MAC or something could be wrong in my code.
Thanks ,
Vivek

pritishgh
In need of some credit
In need of some credit
Posts: 1
Joined: Tue May 16, 2017 4:34 am

Re: Tool Tip does not show on MAC OSX

Post by pritishgh » Tue May 16, 2017 5:45 am

Hi,

I am trying to implement wxStaticBitmap *obj -> SetToolTip(wxT("The tooltip")) in OSx. But the tooltip isn't working there. Can anybody please explain is this a native control issue ?.
As I read some previous comments I came to know that non native controls may not work properly in OSx as expected.

Thanks in Advance.

Regards.

remi
Earned a small fee
Earned a small fee
Posts: 17
Joined: Fri Nov 25, 2005 10:49 pm

Re: Tool Tip does not show on MAC OSX

Post by remi » Fri Oct 06, 2017 12:44 pm

Hi

I have also the same problem here with wx 3.0.3. Simple Tooltips are working well under windows, but they don't appear under macOS sierra 10.12.5, Clang-802.0.42, with the same source code.

I don't know how I could debug that. If people have suggestions to do so that would be great.

Thanks

moki
Earned a small fee
Earned a small fee
Posts: 14
Joined: Mon Dec 08, 2014 1:08 pm
Location: Brive la gaillarde

Re: Tool Tip does not show on MAC OSX

Post by moki » Thu Nov 16, 2017 1:25 pm

Hi,

I also encounter issues with some tooltips on MAC OS if the 2 following condition are met :
  • the tooltip is set on a none native control
  • the tooltips is set before the containing dialog is shown
I have opened a ticket on wxTrac.

Here is a workaround to make tooltips work : it reassign recursively all tooltips of the dialog after it is shown.

Code: Select all

Bind(wxEVT_INIT_DIALOG, &MyDialog::OnInitDialog, this);

Code: Select all

void MyDialog::OnInitDialog(wxInitDialogEvent& event)
{
#ifdef __WXOSX__
    restoreRecursivelyAllToolTips(this);
#endif
    event.Skip();
}

Code: Select all

bool restoreRecursivelyAllToolTips(wxWindow *win)
{
    if (!win)
	return false;

    wxString tooltip = win->GetToolTipText();
    win->UnsetToolTip();
    win->SetToolTip(tooltip);
    
    for (auto child : win->GetChildren())
	restoreRecursivelyAllToolTips(child);

    return true;
}

User avatar
eranon
Can't get richer than this
Can't get richer than this
Posts: 867
Joined: Sun May 13, 2012 11:42 pm
Location: France
Contact:

Re: Tool Tip does not show on MAC OSX

Post by eranon » Wed Dec 06, 2017 7:21 pm

I had this kind of issue on Mac too. I solved it forcing a resize: viewtopic.php?f=23&t=43815&hilit=tooltip
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]

Post Reply