Problem adding tooltips (in linux) Topic is solved
-
- Knows some wx things
- Posts: 27
- Joined: Wed Apr 02, 2008 6:54 pm
- Location: United States
Problem adding tooltips (in linux)
I am having problems adding tooltips using wxGTK for linux.
I have tried
checkbox->SetToolTip("test");
checkbox->SetToolTip(_("test"));
checkbox->SetToolTip(wxT("test"));
and get no joy. All compile with no problems I just don't get tips on mouseover of the checkbox. Any help would be appreciated.
I have tried
checkbox->SetToolTip("test");
checkbox->SetToolTip(_("test"));
checkbox->SetToolTip(wxT("test"));
and get no joy. All compile with no problems I just don't get tips on mouseover of the checkbox. Any help would be appreciated.
Last edited by papafreebird on Fri Apr 18, 2008 9:12 pm, edited 1 time in total.
-
- Knows some wx things
- Posts: 27
- Joined: Wed Apr 02, 2008 6:54 pm
- Location: United States
Tried _T just now and no luck.SteveDowd wrote:you could also try _T("test");
I'm pretty sure that _T() and wxT() are the same, but its worth a shot.
Also, are you setting your tooltip in your createControls() function?
Not sure about the createcontrols funtion. I am using codeblocks to create my form and it has a way to set the properties of an object so I set the tooltip text there and codeblocks did the rest. When that didn't work I tried it manually like i mentioned above.
CreateControls is something that DialogBlocks does for you. its similar to CodeBlocks. i was just making sure you werent adding a tooltip some where that it wasnt stepping into. but if everything is drawing like it should, then you should be good. Maybe there is something weird with linux and tooltips. But i dont really know.
-
- Knows some wx things
- Posts: 27
- Joined: Wed Apr 02, 2008 6:54 pm
- Location: United States
I'm using lots of tooltips for my controls (always with the wxT("tip") form) and I've also noticed that in Linux (wxGTK 2.8.7 Unicode), it is running fine for wxTextCtrl, wxColourPickerCtrl, wxSlider, ... and so, but not for wxCheckBox, as you've commented.papafreebird wrote:Well I'm sure it is probably something I'm doing wrong or a setting I'm missing in codeblocks.
As far as I know tooltips work fine in linux as an app I use from time to time in linux that is written in gtk does have tooltips.
I suppose that it's an issue related to this control in wxGTK, but I should confirm this. In any case, you're not alone
Regards.
Misquotations are the only quotations that are never misquoted
-
- Knows some wx things
- Posts: 27
- Joined: Wed Apr 02, 2008 6:54 pm
- Location: United States
Well. I've just done a dumb test creating a sample app from the C::B wizards and adding some controls to the frame (using wxFormBuider)... and all tooltips have been shown without problems, including checkboxes
I can't understand why they aren't showed for the two apps I run before posting my previous message.
I can't understand why they aren't showed for the two apps I run before posting my previous message.
Misquotations are the only quotations that are never misquoted
-
- Knows some wx things
- Posts: 27
- Joined: Wed Apr 02, 2008 6:54 pm
- Location: United States
-
- Knows some wx things
- Posts: 27
- Joined: Wed Apr 02, 2008 6:54 pm
- Location: United States
What do you mean?papafreebird wrote:(..) Objects inside staticboxes don't work with tooltips but if you place an object outside of staticboxes then tooltips work just fine (..)
The first test application I run before posting have some controls inside a wxStaticBoxSizer. To be concrete: two wxColourPickerControl, four wxCheckBox, four wxSlider and seven wxTextControl. All these controls (the sizer, in fact) are placed inside a wxPanel, and all of them show their tooltips, except for the checkboxes.
I tried recompiling the whole project again, and ... all remain as before. No tooltips for the checkboxes. But with the sample created from the C::B wizard (and edited with wxFormBuilder) that I commented in my last post, all is running fine.
The only difference I've seen is that in the fisrt case, I'm using a main frame created from an inherited class, and the second is using directly the class generated with wxFormBuilder. But the source code is almost identical (in a design sense).
Regards.
Misquotations are the only quotations that are never misquoted