Page 1 of 1

Tooltip on browse header only

Posted: Wed Jul 19, 2017 10:04 am
by bwolfsohn
Roger, etal,

Is it possible to expand the text in a browse header on a mouseover ???

datatooltip seems like overkill and seems to get in the way of the UI when navigating through the browse...

Re: Tooltip on browse header only

Posted: Wed Jul 19, 2017 12:15 pm
by rdonnay
It should be possible.

I'll try to write a sample.

Re: Tooltip on browse header only

Posted: Wed Jul 19, 2017 12:41 pm
by rdonnay
Try this:

Code: Select all

#INCLUDE "dcdialog.CH"

FUNCTION Main()

LOCAL GetList[0], aDir, oBrowse

aDir := Directory()

@ 0,0 DCBROWSE oBrowse DATA aDir FONT '12.Arial' HEADLINES 2 SIZE 40,20

DCBROWSECOL ELEMENT 1 HEADER 'This is;My Header' WIDTH 20 PARENT oBrowse ;
   EVAL {|o|o:heading:enter := {|a,b,o|o:setFontCompoundName('14.Arial Bold')}, ;
            o:heading:leave := {|a,b,o|o:setFontCompoundName('12.Arial')}}

DCREAD GUI FIT TITLE 'Header Font Test'

RETURN nil

PROC appsys ; RETURN

Re: Tooltip on browse header only

Posted: Wed Jul 19, 2017 12:58 pm
by bwolfsohn
Roger,

What i'm looking at needs more than a change in font...

for example,

i have a browse column that is a y/n, but the header says "title received".. the column width is very narrow, as the data is only a single letter..

In effect, i need a tooltip or something like it that will pop-up the full description when the header is moused over.

the datatooltip is very intrusive when working inside the browse...

Re: Tooltip on browse header only

Posted: Wed Jul 19, 2017 1:21 pm
by rdonnay
Did you try the TOOLTIP clause of DCBROWSECOL?

Code: Select all

#INCLUDE "dcdialog.CH"

FUNCTION Main()

LOCAL GetList[0], aDir, oBrowse, GetOptions

aDir := Directory()

@ 0,0 DCBROWSE oBrowse DATA aDir FONT '12.Arial' HEADLINES 2 SIZE 40,20

DCBROWSECOL ELEMENT 1 HEADER 'This is;My Header' WIDTH 20 PARENT oBrowse ;
   TOOLTIP 'This is my header. I am a tooltip that shows over the header' ;

DCGETOPTIONS TOOLTIPFONT '12.Lucida Console'

DCREAD GUI FIT TITLE 'Header Font Test' OPTIONS GetOptions

RETURN nil

PROC appsys ; RETURN

Re: Tooltip on browse header only

Posted: Wed Jul 19, 2017 1:32 pm
by bwolfsohn
Actually, yes, i did try it.. it worked with plain text, but then i couldn't get it to work with variables, so i went down the datatooltip dead-end.. :doh: :doh:

I've done a bunch of revisions since then, and segregated the header into a function call.

When i tried that function call in the tooltip it worked...

sorry for the stupid user interruption.. :)

See you in september... (there's a song in there somewhere)