I have a problem with the tooltip display in TButtonGadget.
This is an MDI application. At the start of the application, with no TMDIChild open, I create a TDockableControlBar including TButtonGadget and TSeparatorGadget, and everything is correct.
When the first TMDIChild is created and activated (EvMDIActivate), I add TButtonGadget in TDockableControlBar. Now the display of the tooltip no longer corresponds to the ID of TButtonGadget. See attached screenshots.
I expect that if I insert 5 new buttons, the tooltip should be shifted by 5.
Note: Only the tootip display is incorrect. When I click the button the command for the ID is performed as expected.
The same code works fine on older versions of OWL. I compile with Visual Studio 2012 and OWLNext 6.34.
Ticket moved from /p/owlnext/feature-requests/84/
Last edit: Vidar Hasfjord 2014-12-11
Hi Xavier,
Thanks for reporting this issue. Have you done any investigation of the source of the problem so far? Which specific older versions work? E.g. does OWLNext 6.32 work?
Yes, I just do the test and it works properly on a 6.32
Have you had a look at the source code and seen any relevant changes between 6.32 and 6.40? Any feedback on the underlying problem would be helpful for an expeditious fix.
I see no difference in relation.
I put breakpoint on TButtonGadget::MouseEnter
the code go to TGadgetWindow::SetHIntComand() with the good id
and code go to frame->HadleMessage (WM_MENUSELECT, id , 0) with good id
it looks OK
I put a breakpoint in ToolTip
In callstack :
TdecoratedFrame:: EvCommandEnabler( ...) with bad id !!!
TCommandEnabler::SetText ()
TTootipEnabler::SetText("text corresponding to bad id")
For now, I do not understand
I made a short exemple . It works in 6.32 and will not work in 6.34
Hi Xavier,
Thanks for the example. That should be helpful.
I do not have time to look at this now, so if you need to have an urgent fix, then check out both versions and compare.
branches/632
branches/634
Tip: You can use WinDiff, or a similar utility, to compare two directory trees.
Hi Xavier,
I have now tested your example code, and I can confirm the problem when using OWLNext 6.34 and Visual Studio 2013.
However, using OWLNext 6.42 and Visual Studio 2015, I cannot reproduce the problem. In 6.42, your example works as expected; the tool tips appear on the correct tool buttons, even after you manipulate the tool bar in EvMDIActivate.
So, the problem seems to have been fixed between 6.34 and 6.40. Let me know if you have identified the relevant changes.
By the way, you can use tool bar merging, similar to menu merging, to avoid having to explicitly manipulate the tool bar when you switch between MDI child windows. See TDecoratedFrame::MergeBar and TFrameWindow::MergeMenu.
Thank you
I have also tested the small example and it works fine from 6-41 (it does not work in 6-40-5)
I will trie on my application. I can't use bar merging because i change tool bar also on the same MDI child (CAD sofware with a lot of command )
Which means there must be a relevant change between 6.41 [r3066] and 6.40.5 [r2932]. You can browse the intervening list of revisions in the Code section (History for 6.41.0).
Did you test 6.40.6 and 6.40.7? This can narrow it down further. Let me know if you identify the relevant change. If so, I will back-port a fix to 6.34, if feasible.
Even though you have more than one possible tool bar per MDI child, you may still be able to use the menu and bar merging functionality to simplify your code. You would just have to store and manage more than one TBarDescr per child, and call into the merging functions manually at the appropriate time, using the desired descriptor.
Related
Commit: [r2932]
Commit: [r3066]
Hi Xavier,
I have now identified the problem. It is related to [bugs:#303], which was fixed in 6.40.6 [r2997].
If you add a manifest for Common Controls 6 to your test project, then the tool tips work fine.
Related
Bugs:
#303Commit: [r2997]
Last edit: Vidar Hasfjord 2015-05-21