Re: Where do I call setHint for statusbar?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Andrew Katz wrote:
> 
> 
> Still does not work.

I assume by that statement you mean that when the program you submitted runs, it
doesn't crash but it doesn't show the tool tips either?

Here is the test program with 'corrections'...
----------------
constant TheProgramType="exw"

include Win32lib.ew
without warning

--------------------------------------------------------------------------------
--  Window Window1
constant Window1 = createEx( Window, "Window1", 0, Default, Default, 400, 300,
0, 0 )
constant StatusBar2 = createEx( StatusBar, "StatusBar2", Window1, 0, 0, 0, 0,
SBT_TOOLTIPS, 0 )
---------------------------------------------------------
--------------------------------------------------------------------------------
constant field1 = 1
constant field2 = 2
setSubFields (StatusBar2,{{200},-1})
showMessage( {"1st subField (plus text to make it very very long)",
{StatusBar2,field1}} )
showMessage( {"2nd subField (plus text to make it very very long)",
{StatusBar2,field2}} )
setHint ( {StatusBar2,field1-1},"Content of field1" )
setHint ( {StatusBar2,field2-1},"Content of field2" )



WinMain( Window1,Normal )
----------------


The first problem is that you didn't specify SBT_TOOLTIPS in the Statusbar's
Flags parameter.

The second problem is that because the text in the panels can completely fit
into the panel areas specified, Windows does not show any tool tips.

The third problem is that you set the text of the panel after setting the hint.
Setting the text of a panelled statusbar automatically resets the hint to the
panel text. (That might be considered a mistake by me, so I'll consider changing
this behaviour).

-- 
Derek Parnell
Melbourne, Australia
Skype name: derek.j.parnell

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu