Window Color Value

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

Hi All,

I have another unique problem. I am trying to have a window get=
 the 
color value out of a EditText, and use the information it=
 receives to 
change the color of the window. But for some reason it does not=
 work. 
The window changes to a dark brown color. Does anyone know how I=
 can 
accomplish this? Example code below:

include Win32Lib.ew
without warning
-----

constant

Win =3D create( Window, "", 0, Default, Default, 127, 140, 0 ),
ColorValue =3D create( EditText, "", Win, 4, 8, 112, 20, 0 ),
ChangeColor =3D create( PushButton, "Change Color", Win, 16, 84, 
88,24,0 )
-----

----Change Color

procedure onClick_ChangeColor()
 object Colors

Colors =3D getText(ColorValue)

 if length(Colors)=3D0
  then
 setWindowBackColor(Win, 8404992 )
   else
 setWindowBackColor(Win, getText(ColorValue) )
  end if

 end procedure

onClick[ChangeColor] =3D routine_id("onClick_ChangeColor")
-----

WinMain( Win, Normal )




Thank You,
Chris

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

Search



Quick Links

User menu

Not signed in.

Misc Menu