If the browser is zoomed, the tooltips are no longer displayed correctly.
They are somewhere on the screen. Is there any way to control/adjust this?
Tooltips in zoomed display
Re: Tooltips in zoomed display
Code: Select all
!document.body.style.zoom = 1.5/ window.devicePixelRatio * 100 + "%"
If OpenWindow(0, 0, 0, 800, 600, "GadgetTooltip", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ButtonGadget(0, 1, 1, 250, 30, "Button with tooltip")
GadgetToolTip(0, "<i>Tooltip</i> for Button")
EndIf
Re: Tooltips in zoomed display
This is probably a problem with the dojo/dijit framework used. If you try to move the window, you will see that this is not the only problem.
Here is a workaround with the normal html title attribute. Not as nice as the dojo/dijit tooltip, but at least this one works:
Here is a workaround with the normal html title attribute. Not as nice as the dojo/dijit tooltip, but at least this one works:
Code: Select all
!document.body.style.zoom = 1.5/ window.devicePixelRatio * 100 + "%"
Procedure ButtonGadgetToolTip(Gadget, ToolTip.s)
Protected GID = GadgetID(Gadget)
! $(v_gid.div).find(".dijitButtonText").attr("title", v_tooltip);
EndProcedure
If OpenWindow(0, 0, 0, 800, 600, "GadgetTooltip", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ButtonGadget(0, 1, 1, 250, 30, "Button with tooltip")
ButtonGadgetToolTip(0, "Tooltip for Button")
EndIf