When the toobar is added via "AddPane" in non-floating mode (docked)
we can see the tooltip. When we pull the toolbar out and float it, the
tooltips are gone. When we re-dock it, the tooltips come back.
If the toolbar was initially added via "AddPane" in floating mode, the
tooltips are never seen.
The problem does not seem to appear in Linux.
You can see the problem in the aui sample program by adding tootips to
the large vertical toolbar that is initially docked on the left (tb5).
For example:
tb5->AddTool(101, wxT("Test"),
wxArtProvider::GetBitmap(wxART_ERROR), _T("Tooltip1"));
tb5->AddSeparator();
tb5->AddTool(102, wxT("Test"),
wxArtProvider::GetBitmap(wxART_QUESTION), _T("Tooltip2"));
tb5->AddTool(103, wxT("Test"),
wxArtProvider::GetBitmap(wxART_INFORMATION), _T("Tooltip3"));
tb5->AddTool(103, wxT("Test"),
wxArtProvider::GetBitmap(wxART_WARNING), _T("Tooltip4"));
tb5->AddTool(103, wxT("Test"),
wxArtProvider::GetBitmap(wxART_MISSING_IMAGE), _T("Tooltip5"));
There is also another problem which I do not think is related to AUI.
Note that the tooltips on Windows seem to get confused when tools have
the same ID. For example, note that 3rd, 4th and 5th tool have the
same ID. There is no tooltip shown for the 3rd and 4th tool and the
tooltip for the 5th tool shows "Tooltip3" instead of "Tooltip5".
Again, in Linux the tooltips seem correctly aligned.
I am using wxWidgets version 2.8.8.
> When the toobar is added via "AddPane" in non-floating mode (docked)
> we can see the tooltip. When we pull the toolbar out and float it, the
> tooltips are gone. When we re-dock it, the tooltips come back.
I don't see this with the current svn trunk.
> You can see the problem in the aui sample program by adding tootips to
> the large vertical toolbar that is initially docked on the left (tb5).
Here is what I did:
Index: samples/aui/auidemo.cpp
===================================================================
--- samples/aui/auidemo.cpp (revision 55085)
+++ samples/aui/auidemo.cpp (working copy)
@@ -803,12 +803,12 @@
wxToolBar* tb5 = new wxToolBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
wxTB_FLAT | wxTB_NODIVIDER | wxTB_VERTICAL);
tb5->SetToolBitmapSize(wxSize(48,48));
- tb5->AddTool(101, wxT("Test"), wxArtProvider::GetBitmap(wxART_ERROR));
+ tb5->AddTool(101, wxT("Test"), wxArtProvider::GetBitmap(wxART_ERROR), _T("Tooltip1"));
tb5->AddSeparator();
- tb5->AddTool(102, wxT("Test"), wxArtProvider::GetBitmap(wxART_QUESTION));
- tb5->AddTool(103, wxT("Test"), wxArtProvider::GetBitmap(wxART_INFORMATION));
- tb5->AddTool(103, wxT("Test"), wxArtProvider::GetBitmap(wxART_WARNING));
- tb5->AddTool(103, wxT("Test"), wxArtProvider::GetBitmap(wxART_MISSING_IMAGE));
+ tb5->AddTool(102, wxT("Test"), wxArtProvider::GetBitmap(wxART_QUESTION), _T("Tooltip2"));
+ tb5->AddTool(103, wxT("Test"), wxArtProvider::GetBitmap(wxART_INFORMATION), _T("Tooltip3"));
+ tb5->AddTool(103, wxT("Test"), wxArtProvider::GetBitmap(wxART_WARNING), _T("Tooltip4"));
+ tb5->AddTool(103, wxT("Test"), wxArtProvider::GetBitmap(wxART_MISSING_IMAGE), _T("Tooltip5"));
tb5->Realize();
// add a bunch of panes
And I see the tooltips just fine when the toolbar is undocked. I didn't
test with 2.8 yet but I don't remember any changes in this area so I wonder
if it could be due to some other difference between our setups. I use MSVC
7.1 under Windows 2003.
> There is also another problem which I do not think is related to AUI.
> Note that the tooltips on Windows seem to get confused when tools have
> the same ID. For example, note that 3rd, 4th and 5th tool have the
> same ID. There is no tooltip shown for the 3rd and 4th tool and the
> tooltip for the 5th tool shows "Tooltip3" instead of "Tooltip5".
Using controls with the same ids under Windows is just a bad idea. I've
changed the sample to not do it.
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
I am using MSYS/MINGW, which uses gcc 3.4.2 (mingw-special) on Windows
XP. We do have a different setup... perhaps that is what accounts for
the differences we see?