Re: Where do I call setHint for statusbar?
- Posted by Derek Parnell <ddparnell at bigpond.com> Mar 15, 2007
- 582 views
Andrew Katz wrote: > I see a problem with how we interpret tool tips. Ideally, both the text in a > status bar subfield and its tool tip should be dynamic. I mean, that the > program should be able to change either one at any time. In my program, the > hints stay the same (it is my help mechanism). Fair enough. I think I agree with you. > Even though I do not need this for my program, but I noticed that in the > browser firefox, the status bar seems to have controls inside of the > subfields. So maybe those are the ones generating the tool tips. > > Has anyone successfully written an application using the Euphoria IDE and > windows library, with controls inside of subfields of a status bar? Here is a basis of something you might be able to use...
---------------- constant TheProgramType="exw" include Win32lib.ew without warning -------------------------------------------------------------------------------- -- Window Window1 constant Window1 = createEx( Window, "Window1", 0, Default, Default, 400, 300, 0, 0 ) constant FakeSB = createEx( Label, "", Window1, 0,{w32AltEdge, -40}, 0.9999, 40, WS_BORDER, WS_EX_CLIENTEDGE ) --------------------------------------------------------- -------------------------------------------------------------------------------- sequence textsize textsize = getTextExtent(Window1, "M") textsize[2] += 10 constant f1 = createEx(Label, "1st subField", FakeSB, 2, -1, 100, textsize[2]-4, WS_BORDER, WS_EX_STATICEDGE) constant f2 = createEx(Label, "2nd subField", FakeSB,104, -1, 100, textsize[2]-4, WS_BORDER, WS_EX_STATICEDGE) -- Ensure 'statusbar' always spans the window. procedure Resize_Window(integer self, integer event, sequence parms) setRect(FakeSB, 0, {w32AltEdge, -textsize[2]}, 0.9999, textsize[2], 1) end procedure setHandler(Window1, w32HResize, routine_id("Resize_Window")) setHint ( f1,"Content of field1" ) setHint ( f2,"Content of field2" ) WinMain( Window1,Normal ) ----------------
-- Derek Parnell Melbourne, Australia Skype name: derek.j.parnell