Re: Win32 Static Controls

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

Brian,

Here's a possibility, based on what Adam said; if you move the mouse around
the upper left quadrant, at some places you'll see a message appear in a
LText control, & when you leave the defined area of the LText control, the
text disappears (it's not sized optimally for the text displayed, it's a
little too big vertically):

------ code begins -----

--  code generated by Win32Lib IDE v0.8

include Win32Lib.ew
without warning

----------------------------------------------------------------------------
----
--  Window Window1
global constant Window1 = create( Window, "The Window", 0, Default, Default,
350, 250+ 19, 0 )
global constant LText1 = create( LText, "LText1", Window1, 50, 50, 200, 50,
0 )
----------------------------------------------------------------------------
----

procedure Window1_onMouse ( int event, int x, int y, int shift )
if event = MOUSE_MOVE then
   if x > 50   and x < 250  and y > 50 and y < 100 then
     setText(LText1, "HELLO")
   else
     setText(LText1, "")
   end if
end if
end procedure
onMouse[Window1] = routine_id("Window1_onMouse")



WinMain( Window1, Normal )

---------- code ends  -----------------------




-----Original Message-----
From: Brian Jackson <bjackson at 2FARGON.HYPERMART.NET>
To: EUPHORIA at LISTSERV.MUOHIO.EDU <EUPHORIA at LISTSERV.MUOHIO.EDU>
Date: Saturday, January 15, 2000 9:56 PM
Subject: Win32 Static Controls


>Does anyone know a way to get around the fact that the STATIC class of
>controls won't respond to windows events?  For example, I want to create an
>LText that changes text or does some other cool thing when the mouse rolls
>over it.  I COULD just create an EditText with the WindowBackColor set to
>match the window, with no border or 3-D effects, but I'd rather just use an
>LText.  Eventually, I'll end up finding myself in the same boat on ALL the
>STATIC class controls, so if anybody has a suggestion, I'd love to hear it!
>
>Thanks in advance,
>
>Brian

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

Search



Quick Links

User menu

Not signed in.

Misc Menu