Re: Window Color Value
- Posted by Lewis Townsend <keroltarr at HOTMAIL.COM> Jun 25, 2001
- 562 views
Hello Chris, I'm assuming you want to type in a color in the form: #RRGGBB or equivalent. Well, "setWindowBackColor()" seems to want it in #BBGGRR format instead. I don't know why. Maybe it's a bug. If this is Okay with you, here is the code that will do the trick. constant Win = create( Window, "", 0, 99, 99, 127, 140, 0 ), ColorValue = create( EditText, "", Win, 4, 8, 112, 20, 0 ), ChangeColor = create(PushButton, "Color", Win, 16, 84, 88, 24, 0 ) ----Change Color procedure onClick_ChangeColor() setWindowBackColor(Win, getNumber(ColorValue) ) end procedure onClick[ChangeColor] = routine_id("onClick_ChangeColor") -----Start WinMain( Win, Normal ) If you don't like the BGR format you will have to programatically massage your input into that format. Or else get Derek to change it. Is it a bug Derek, David? later, Lewis Townsend