Page 1 of 2

[5.60] tooltip not showing w/o "enable modern theme support"

Posted: Tue Jun 06, 2017 6:08 am
by Pureabc
Tooltips not showing when "enable modern theme support" is unchecked.

PB 5.60(x86) under win7

Code: Select all

If OpenWindow(0, 0, 0, 150, 60, "ToolBar", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    If CreateToolBar(0, WindowID(0))
      ToolBarStandardButton(0, #PB_ToolBarIcon_New)
      ToolBarStandardButton(1, #PB_ToolBarIcon_Open)
      ToolBarStandardButton(2, #PB_ToolBarIcon_Save)
      DisableToolBarButton(0, 1, 1) : Disabled = #True
      ToolBarImageButton(3, LoadImage(0, #PB_Compiler_Home + "examples/sources/Data/Cdplayer.ico"))
      ToolBarToolTip(0, 2, "save")
      ToolBarToolTip(0, 3, "Cdplayer")
      DisableToolBarButton(0,3, 1)
    EndIf

    ButtonGadget(0, 20, 30, 110, 20, "Enable OpenFile")

    Repeat
      Event = WaitWindowEvent()
      If Event = #PB_Event_Gadget
        If EventGadget() = 0
          If Disabled = #True
            DisableToolBarButton(0, 1, 0)
            DisableToolBarButton(0,3, 0)
            SetGadgetText(0,"Disable OpenFile")
            Disabled = #False
          Else
            DisableToolBarButton(0, 1, 1)
            DisableToolBarButton(0,3, 1)
            SetGadgetText(0,"Enable OpenFile")
            Disabled = #True
          EndIf
        EndIf
      EndIf
    Until Event = #PB_Event_CloseWindow 
  EndIf



Re: [5.60] tooltip not showing w/o "enable modern theme supp

Posted: Tue Jun 06, 2017 10:11 am
by IdeasVacuum
Confirmed on Win7 x86 - very odd.

Re: [5.60] tooltip not showing w/o "enable modern theme supp

Posted: Fri Dec 20, 2019 5:33 pm
by lgb-this
Same here with Win10 release 1909.

Re: [5.60] tooltip not showing w/o "enable modern theme supp

Posted: Fri Dec 20, 2019 6:17 pm
by IdeasVacuum
...you can use Win API to control the tooltips. See:

viewtopic.php?f=13&t=74165

Re: [5.60] tooltip not showing w/o "enable modern theme supp

Posted: Fri Dec 20, 2019 10:06 pm
by lgb-this
With "enable modern theme support" unchecked, the tooltip flickers in StringGadgets and SpinGadgets, but not in CheckBoxGadgets and some other gadgets.

If i enable this support, all tooltips are ok, no flickering. Unfortunately i have problems with certain gadgets regarding fonts with this support enabled. I would like to stay on the unchecked option.

I use PB 5.71 x64.

Any idea how to avoid the flickering ?

Re: [5.60] tooltip not showing w/o "enable modern theme supp

Posted: Sat Dec 21, 2019 12:09 am
by IdeasVacuum
... might be easier to fix the fonts problem. What is the problem with fonts?

Re: [5.60] tooltip not showing w/o "enable modern theme supp

Posted: Sat Dec 21, 2019 4:03 am
by BarryG
Pureabc wrote:Tooltips not showing when "enable modern theme support" is unchecked.
They show here on Win 10 (1903) with both modern theme enabled or disabled, and PureBasic 5.71 (x86).

Re: [5.60] tooltip not showing w/o "enable modern theme supp

Posted: Sat Dec 21, 2019 6:18 am
by lgb-this
BarryG wrote:They show here on Win 10 (1903) with both modern theme enabled or disabled, and PureBasic 5.71 (x86).
I could isolate the problem: My old Lenovo X200T with Win10 Pro 1909 shows the tooltips without flickering and modern theme disabled. My newer Lenovo MIIX 720 has a high resolution screen with 2880x1920 pixel. I have to use the scale of 200% for text and apps, otherwise the items are extremly small. The test application shows the flickering with modern theme disabled only with the scale 200%. If i change to 100% - tooltips are ok.

Any idea to fix that ?

Here my small test application:

Code: Select all

OpenWindow(0, 50, 50, 600, 400, "Test")

SpinGadget(10,20,20,60,20,0,100,#PB_Spin_Numeric|#ES_RIGHT)
SetGadgetState(10,33)
GadgetToolTip(10,"SpinGadget 10")

CheckBoxGadget(20,20,50,100,20,"CheckBoxGadget")
GadgetToolTip(20,"CheckBoxGadget 20")

StringGadget(30,20,80,120,14,"Test")
GadgetToolTip(30,"StringGadget 30")

Repeat
  EventID = WaitWindowEvent(1) 
Until EventID = #PB_Event_CloseWindow

Re: [5.60] tooltip not showing w/o "enable modern theme supp

Posted: Sat Dec 21, 2019 7:08 am
by IdeasVacuum
... is DPI aware selected in Compiler options?

Re: [5.60] tooltip not showing w/o "enable modern theme supp

Posted: Sat Dec 21, 2019 7:16 am
by lgb-this
IdeasVacuum wrote:... is DPI aware selected in Compiler options?
The flickering is there independant of this option with modern theme disabled.

Re: [5.60] tooltip not showing w/o "enable modern theme supp

Posted: Sat Dec 21, 2019 7:17 am
by IdeasVacuum
Potential solution by codeprof here: viewtopic.php?f=5&t=54014

Re: [5.60] tooltip not showing w/o "enable modern theme supp

Posted: Sat Dec 21, 2019 7:21 am
by BarryG
Pureabc wrote:PB 5.60(x86) under win7
Don't forget bullet point #1 here -> viewtopic.php?f=4&t=4701

Have you tested this "bug" with 5.71 yet? If not, why not?

Re: [5.60] tooltip not showing w/o "enable modern theme supp

Posted: Sat Dec 21, 2019 7:40 am
by lgb-this
BarryG wrote:Don't forget bullet point #1 here -> viewtopic.php?f=4&t=4701

Have you tested this "bug" with 5.71 yet? If not, why not?
I used this thread, because the topic is the same and the problem is not solved, as it looks like. I make all the tests with the newest release 5.71.

Re: [5.60] tooltip not showing w/o "enable modern theme supp

Posted: Sat Dec 21, 2019 7:42 am
by lgb-this
IdeasVacuum wrote:Potential solution by codeprof here: viewtopic.php?f=5&t=54014
Do you mean: Callback funtion of the StringGadget ?

I'm not so familiar with these things.

Re: [5.60] tooltip not showing w/o "enable modern theme supp

Posted: Sat Dec 21, 2019 6:37 pm
by lgb-this
IdeasVacuum wrote:... might be easier to fix the fonts problem. What is the problem with fonts?
See the pics here:

modern theme disabled
Image

modern theme enabled
Image

The text is not completely visible with the option enabled.