Lisp HUG Maillist Archive

slider color

Hi all
I have tried to change the color of a capi:slider (not the actual handle, but the background), using "setf capi:simple-pane-background" and also "setf capi:simple-pane-foreground", but without luck.
Any hints?
Thanks!
Sven



_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


RE: slider color

As far as I know CAPI sliders are rendered entirely by the native windowing system. I imagine what you want is possible via the FLI, however. What platform are you on?


Chris


> From: sven.emtell@doremir.com
> Subject: slider color
> Date: Wed, 10 Oct 2012 14:29:24 +0200
> CC: sven.emtell@doremir.com
> To: lisp-hug@lispworks.com
>
>
> Hi all
> I have tried to change the color of a capi:slider (not the actual handle, but the background), using "setf capi:simple-pane-background" and also "setf capi:simple-pane-foreground", but without luck.
> Any hints?
> Thanks!
> Sven
>
>
>
> _______________________________________________
> Lisp Hug - the mailing list for LispWorks users
> lisp-hug@lispworks.com
> http://www.lispworks.com/support/lisp-hug.html
>

RE: slider color

A native windows slider is actually called a 'trackbar'. As far as I can tell this is what a CAPI slider on Windows actually is. This stackoverflow question suggests that in order to change the colour you would need to intercept the WM_CTLCOLORSTATIC window message. CAPI doesn't allow direct access to a window's message loop, but you can substitute your own window procedure via a well-known technique called subclassing. I have used this technique several times to customize the behaviour and appearance of CAPI windows, and if it's not too urgent when I have a moment I could dig out the code and send it to you.



This seems a lot of work just to get a colour change, however. If it's possible to change the colour of a slider through the CAPI on Mac OS X there might still be a way to do the same on Windows.. Personally if I want a widget with a non-native appearance I now tend to implement them as custom widgets on top of a pinboard-layout.


Chris



From: sven.emtell@doremir.com
Subject: Re: slider color
Date: Thu, 11 Oct 2012 16:11:39 +0200
To: relativeflux@hotmail.co.uk; lisp-hug@lispworks.com

Oops. I forgot to mention that this is on Windows (LWW6.1).
On Mac OS X (LWM6.1) this is not a problem.
/Sven


11 okt 2012 kl. 16:06 skrev Christopher Melen:

As far as I know CAPI sliders are rendered entirely by the native windowing system. I imagine what you want is possible via the FLI, however. What platform are you on?


Chris


> From: sven.emtell@doremir.com
> Subject: slider color
> Date: Wed, 10 Oct 2012 14:29:24 +0200
> CC: sven.emtell@doremir.com
> To: lisp-hug@lispworks.com
> 
> 
> Hi all
> I have tried to change the color of a capi:slider (not the actual handle, but the background), using "setf capi:simple-pane-background" and also "setf capi:simple-pane-foreground", but without luck.
> Any hints?
> Thanks!
> Sven
> 
> 
> 
> _______________________________________________
> Lisp Hug - the mailing list for LispWorks users
> lisp-hug@lispworks.com
> http://www.lispworks.com/support/lisp-hug.html
> 


--- 
Sven Emtell, CTO, DoReMIR Music Research

www.scorecleaner.com

Check out the ScoreCleaner introductory video here






RE: slider color

No problem, Sven. That sounds like the best solution.



Chris


Subject: Re: slider color
From: sven.emtell@doremir.com
Date: Sun, 4 Nov 2012 16:13:04 +0100
CC: lisp-hug@lispworks.com
To: relativeflux@hotmail.co.uk

Thanks Christopher
We chose to implement this as a class inheriting from output-pane.
Sven


11 okt 2012 kl. 17:43 skrev Christopher Melen:

A native windows slider is actually called a 'trackbar'. As far as I can tell this is what a CAPI slider on Windows actually is. This stackoverflow question suggests that in order to change the colour you would need to intercept the WM_CTLCOLORSTATIC window message. CAPI doesn't allow direct access to a window's message loop, but you can substitute your own window procedure via a well-known technique called subclassing. I have used this technique several times to customize the behaviour and appearance of CAPI windows, and if it's not too urgent when I have a moment I could dig out the code and send it to you.



This seems a lot of work just to get a colour change, however. If it's possible to change the colour of a slider through the CAPI on Mac OS X there might still be a way to do the same on Windows. Personally if I want a widget with a non-native appearance I now tend to implement them as custom widgets on top of a pinboard-layout.


Chris



From: sven.emtell@doremir.com
Subject: Re: slider color
Date: Thu, 11 Oct 2012 16:11:39 +0200
To: relativeflux@hotmail.co.uk; lisp-hug@lispworks.com

Oops. I forgot to mention that this is on Windows (LWW6.1).
On Mac OS X (LWM6.1) this is not a problem.
/Sven


11 okt 2012 kl.. 16:06 skrev Christopher Melen:

As far as I know CAPI sliders are rendered entirely by the native windowing system. I imagine what you want is possible via the FLI, however. What platform are you on?


Chris


> From: sven.emtell@doremir.com
> Subject: slider color
> Date: Wed, 10 Oct 2012 14:29:24 +0200
> CC: sven.emtell@doremir.com
> To: lisp-hug@lispworks.com
> 
> 
> Hi all
> I have tried to change the color of a capi:slider (not the actual handle, but the background), using "setf capi:simple-pane-background" and also "setf capi:simple-pane-foreground", but without luck.
> Any hints?
> Thanks!
> Sven
> 
> 
> 
> _______________________________________________
> Lisp Hug - the mailing list for LispWorks users
> lisp-hug@lispworks.com
> http://www.lispworks.com/support/lisp-hug.html
> 





Updated at: 2020-12-10 08:36 UTC