1. RE: Change ProgressBar colors in Win32lib?
- Posted by Brian Broker <brian_broker at yahoo.com> Nov 19, 2005
- 415 views
Joel Garcia wrote: > > > posted by: Joel Garcia <heyjoel at comcast.net> > > > I'm curious to know how to change the colors of a ProgressBar so that > the background is not gray and the bar itself is not teal. I've been > looking around for clues in the documentation, but this is my first > program using Win32lib for Euphoria. Any help is appreciated. > > Joel I don't think this functionality is built into Win32Lib but you can always pass messages to the control...
include win32lib.ew constant Win = create(Window,"Pbar",0,Default,Default,400,100,0), Pbar = create(ProgressBar,"",Win,10,50,370,20,0) constant PBM_SETBKCOLOR = #2001, PBM_SETBARCOLOR = #0409 VOID = sendMessage(Pbar,PBM_SETBKCOLOR,0,BrightBlue) VOID = sendMessage(Pbar,PBM_SETBARCOLOR,0,BrightRed) integer n, inc n = 0 inc = 5 procedure timerHandler( integer id, integer event, sequence params ) n += inc if n >= 100 then inc = -5 elsif n <= 0 then inc = 5 end if setScrollPos(Pbar, n) end procedure setHandler(Win, w32HTimer, routine_id( "timerHandler") ) setTimer( Win, 1, 500 ) WinMain(Win,Normal)
-- Brian
2. RE: Change ProgressBar colors in Win32lib?
- Posted by Joel Garcia <heyjoel at comcast.net> Nov 19, 2005
- 415 views
Thanks, Brian. sendMessage is a new toy for me, now. It worked like a charm, of course, and I'm going to go have fun exploring what else it can do for me. Cheers, Joel