Add tooltips on side panes

kalvaro's profile image kalvaro posted 9 years ago in Feature discussion Permalink

When left and right panes are too narrow to display full object names there's no way to, well, see full object names. I guess it wouldn't be too difficult to display it in a tooltip... O:-)

kalvaro's profile image kalvaro posted 9 years ago Permalink

Same request for column headers in data grids.

ansgar's profile image ansgar posted 9 years ago Permalink

These tooltips are already activated, only they are triggered when the space gets far too small, not as soon as one character is invisible. I don't have code which does that in HeidiSQL, only the relevant event is filled with text when VirtualTreeView requests the hint text. So I guess it's a glitch in VirtualTreeView, perhaps a miscalculation of the required space for the text.

1 attachment(s):
  • hints-database
kalvaro's profile image kalvaro posted 9 years ago Permalink

You're right... Tooltips seem to show up only when more than 1/3 of the name is hidden :(

ansgar's profile image ansgar posted 9 years ago Permalink

Yes, I bet this is a bug in VirtualTree, or probably I am missing something in the Options array of the virtual tree instances. VirtualTree seems to be overtaken by JamSoftware, the makers of TreeSize, and they don't offer some bugtracker or forum - nothing. It's a shame for this brilliant piece of OpenSource software.

Or is it at GitHub already?

ansgar's profile image ansgar posted 9 years ago Permalink

I guess I am missing some setting for getting the hints to work properly, as the tree in the session manager does not have this issue. I'm going to compare settings from both trees.

ansgar's profile image ansgar posted 9 years ago Permalink

Ok:

  1. HintMode is set to hmTooltip on both trees
  2. Indent is 12 on dbtree, 18 on session tree (doesn't do anything when I set both to 18)
  3. ParentShowHint is False on dbtree, True on session tree (does not seem to make a difference when I set to true)
  4. ShowHint is True on both
  5. OnGetHint is AnyGridGetHint on both trees

Hmm... Must be something with the Header.Columns.

ansgar's profile image ansgar posted 9 years ago Permalink

Ah, just found out: if you hide the "size" column (rightclick on the tree, then click "Treestyle options" then disable "Display size column"), then the issue is fixed. So, the size column is causing this miscalculation for some reason. Probably due to its auto-sizing behaviour. Probably not fixable without breaking something else.

Code modification/commit 2e2b6f2 from ansgarbecker, 9 years ago, revision 9.3.0.5046
Try to show tooltip when columns in database tree are too narrow to show the full text. See http://www.heidisql.com/forum.php?t=20458
ansgar's profile image ansgar posted 9 years ago Permalink

r5046 attempts to fix the non-showing hints.

I stumbled over the LineBreakStyle in VirtualTree's OnGetHint event, which I had set to hlbForceMultiLine. r5046 sets it to hlbForceSingleLine, which suddently shows the hint for me. Please check if it does that for you too.

kalvaro's profile image kalvaro posted 9 years ago Permalink

Quick tests with left pane look pretty good, thank you very much. I'll report back if I find something that needs further tweaking.

As about data grids (which I presume come from an entirely difference component), I've just noticed that those in "Data" tab do actually display tooltips (column comments). No idea if it can be configured to show header content.

ansgar's profile image ansgar posted 9 years ago Permalink

The data grids are also VirtualTree instances. Differently configured, but the tooltip/hints configuration are synchronized on both.

What do you mean by header content ?

The column headers in the data grid are configured to show column comments, right. The cells in the grids show their contents when it does not fit to the displayed width.

kalvaro's profile image kalvaro posted 9 years ago Permalink

You see inner row values when you hover them but not headers. For instance:

Data grid

ansgar's profile image ansgar posted 9 years ago Permalink

Ah, understand now. Yes, the column headers only show their comment if there is one. But I could easily add the column name if the comment is empty. That should ensure you get a tooltip on any column header, regardless of its width. Unfortunately there is no way to only show that tooltip on column headers if it's not wide enough to show the name. But I guess that's not a showstopper.

kalvaro's profile image kalvaro posted 9 years ago Permalink

That's better than nothing :)

Code modification/commit 287ac27 from ansgarbecker, 8 years ago, revision 9.3.0.5120
Fix crash when showing hint (animation) on grid cells with large text portions.
See
* http://www.heidisql.com/forum.php?t=20458#p20548
* http://www.heidisql.com/forum.php?t=22277

Please login to leave a reply, or register at first.