STR #2010

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]

Return to Bugs & Features | Roadmap 2.0 | Post Text | Post File ]

STR #2010

Application:FLTK Library
Status:5 - New
Priority:1 - Request for Enhancement, e.g. asking for a feature
Scope:3 - Applies to all machines and operating systems
Summary:need copy_tooltip
Created By:bnolsen
Assigned To:Unassigned
Fix Version:Unassigned
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:

Post File ]
Name/Time/Date Filename/Size top right image
#1 bnolsen
11:33 Jul 18, 2008
bottom left image   bottom right image

Trouble Report Comments:

Post Text ]
Name/Time/Date Text top right image
#1 bnolsen
11:33 Jul 18, 2008
I'd like to be able to use dynamic tooltips, ie, change them on the fly based on the data being shown (specially in an elided header in a browser).

I added copy_tooltip in the same way that copy_label is implemented.

HOWEVER that means another flag() value is burned which could cause all kinds of trouble.
#2 matt
06:21 Jul 19, 2008
A better way to do this is to send a message to the widget before the toolti[p is shown. This avoids having to set the tooltip text over an over again. This should be part of the tooltip source file.  
#3 bnolsen
14:41 Jul 23, 2008
I'm not exactly sure what you mean by this.
I'm creating a widget then "building" the tooltip.
I *could* keep around an array of char* in my application and manually delete them but I shouldn't have to do that.
As mentioned this tooltip is for elided text...meains the widget itself is too small to display the full text so it displays a subset of the contents and the tooltip shows the real contents.
#4 matt
16:28 Jul 23, 2008
OK, I explained this badly. There are two issues: 1, making a tooltip copy the string, so you don't have to keep track of it is nice. But it is also not very diffigult to query the current tooltip, free it, then create a new tooltip. Not a big deal though.

The second issue is a problem that can arise if you continously change tooltips around. It is time consuming and may fragment memory by constantly allocating and deallocating memory, just in case the user may need a tooltip. It would be neat to get a TOOLTIP event just before an actual tooltip would be displayed, so I can allocate a ew string just once, when it is actually shown.
#5 greg.ercolano
16:47 Dec 01, 2010
Devs: this STR is similar to #1944.
#6 greg.ercolano
17:00 Dec 01, 2010
Side note: I'm making similar changes to 1.3, and was just
perusing this STR for reference, since its similar.

2.x Devs: note in OP's patch, copy_tooltip() docs still refer
to 'label()' and 'copy_label()'; be sure to correct. Also, note patch
introduces unusual indenting in the flags definition. Check carefully
when applying.
bottom left image   bottom right image

Return to Bugs & Features | Post Text | Post File ]


Comments are owned by the poster. All other content is copyright 1998-2023 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to ''.