[Gambas-user] Question about tooltip: font size and duration of view

vuott at tutanota.com vuott at tutanota.com
Mon Oct 9 13:30:15 CEST 2023


« it is possible to change the duration, and make it longher? »

Yes, it's possible by using Timer.

Exemplum:

Private Const FONTSIZE As Byte = 18
Private b As Byte


Public Sub Form_Open()

  Label1.Font.Size = FONTSIZE
  Label1.Text = "test"

End

Public Sub Label1_Enter()

  With Timer1  
   .delay = 1000
   .Start  
  End With

End

Public Sub Label1_Leave()

  b = 0

End

Public Sub Timer1_Timer()

  Label1.Tooltip = "<FONT Color=red size=" & CStr(FONTSIZE) & ">Counting: " & CStr(b)

  If b = 20 Then
' We null the "ToolTip," assigning it string value "Null."
    Label1.Tooltip = Null
    b = 0
  Endif

Inc b

End
----------------------------------------



9 ott 2023, 12:22 da roberto.premoli at tiscali.it:

> LEt say I have the follo label:
>
> label1.text = "test"
> label1.tooltip = "This label is a test"
>
> I can manage font size of label with
> label1.font.size += 3
>
> but I wish to increase also the font in the tooltip but unfortunately does not exist  command like the follow:
>
> label1.tooltip.font.size += 3
>
> So i ask: is it possible to resize the font size of tooltip or ar they a fixed size?
>
> Second question: i place cursor on label1 and tooltip popup after about 1 second and stay visible for about 13 seconds, then disappear: it is possible to change the duration, and make it longher?
>
> some as:
>
> label1.tooltip.visibletime = 30 ?
>
> Thanks
> Roberto
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20231009/d97da81e/attachment.htm>


More information about the User mailing list