distal-attribute
distal-attribute
distal-attribute
distal-attribute

Add tooltips on side panes

kalvaro posted 2 years ago in Feature discussion

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 posted 2 years ago

Same request for column headers in data grids.

ansgar posted 2 years ago

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 posted 2 years ago

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

ansgar posted 2 years ago

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 posted 2 years ago

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 posted 2 years ago

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 posted 2 years ago

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.

ansgar posted 2 years ago

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 posted 2 years ago

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 posted 2 years ago

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 posted 2 years ago

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

Data grid

ansgar posted 2 years ago

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 posted 2 years ago

That's better than nothing :)

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