1. ListView Selection Bar Color
- Posted by C Bouzy <eucoder at hotmail.com> Dec 04, 2005
- 530 views
- Last edited Dec 05, 2005
Does anyone know how to set the color of a ListView selection bar color? I know it can be done without creating an owner drawn control, but I am not 100% sure how. I am using Win32Lib....
2. Re: ListView Selection Bar Color
- Posted by C Bouzy <eucoder at hotmail.com> Dec 05, 2005
- 557 views
- Last edited Dec 06, 2005
No one knows how to do this? C Bouzy wrote: > > Does anyone know how to set the color of a ListView selection bar color? I > know > it can be done without creating an owner drawn control, but I am not 100% sure > how. > I am using Win32Lib.... ----If you continue to do what you have always done, you will get what you have always gotten.----
3. Re: ListView Selection Bar Color
- Posted by Al Getz <Xaxo at aol.com> Dec 06, 2005
- 519 views
C Bouzy wrote: > > No one knows how to do this? > > C Bouzy wrote: > > > > Does anyone know how to set the color of a ListView selection bar color? I > > know > > it can be done without creating an owner drawn control, but I am not 100% > > sure > > how. > > I am using Win32Lib.... > > > ----If you continue to do what you have always done, > you will get what you have always gotten.---- Hello there, I searched the MS site and couldnt find anything on changing the selection bar color. It's possible there is no way to do this without going to an owner drawn style. Take care, Al And, good luck with your Euphoria programming! My bumper sticker: "I brake for LED's"
4. Re: ListView Selection Bar Color
- Posted by CChris <christian.cuvier at insee.fr> Dec 06, 2005
- 542 views
Al Getz wrote: > > C Bouzy wrote: > > > > No one knows how to do this? > > > > C Bouzy wrote: > > > > > > Does anyone know how to set the color of a ListView selection bar color? I > > > know > > > it can be done without creating an owner drawn control, but I am not 100% > > > sure > > > how. > > > I am using Win32Lib.... > > > > > > ----If you continue to do what you have always done, > > you will get what you have always gotten.---- > > Hello there, > > I searched the MS site and couldnt find anything on changing the > selection bar color. It's possible there is no way to do this > without going to an owner drawn style. > > > Take care, > Al > > And, good luck with your Euphoria programming! > > My bumper sticker: "I brake for LED's" I didn't try it, but: The color of a highlighted item in a control is a system color whose identifier is COLOR_HILIGHT. Using SetSysColor() (in the Window API), and passing it this index into the system palette and the new desired color, you'll obtain what you wish, well almost. Almost, because the changes will be visible next time your control is painted again. Almost, because all windows visible at the time of the call will be affected. The M$ doc recommends calling SetSysColor() whe the app window is maximised, for this reason. You can circumvent this by trapping WM_SYSCOLORCHANGE to let only your app know about it. Almost, because you must take care to save and restore the modified system color when your app gains/loses focus. Otherwise, the results could be ... interesting. I forgot to mention that the above applies to ay of the systel colors you can get by GetSysColors(). HTH CChris
5. Re: ListView Selection Bar Color
- Posted by petelomax at fastmail.fm Dec 06, 2005
- 511 views
> posted by: C Bouzy <eucoder at hotmail.com> > > No one knows how to do this? > > C Bouzy wrote: > > > > Does anyone know how to set the color of a ListView selection bar color? I > > know > > it can be done without creating an owner drawn control, but I am not 100% > > sure > > how. > > I am using Win32Lib.... I can use LVM_SETTEXTBKCOLOR, LVM_SETTEXTCOLOR, and LVM_SETBKCOLOR (which do not affect the selection bar colour), however I noticed LVM_SETSELECTIONMARK for which I cannot find any documentation. Does that ring a bell? Regards, Pete -- petelomax at fastmail.fm -- http://www.fastmail.fm - Accessible with your email software or over the web
6. Re: ListView Selection Bar Color
- Posted by Al Getz <Xaxo at aol.com> Dec 06, 2005
- 536 views
- Last edited Dec 07, 2005
petelomax wrote: > > > posted by: C Bouzy <eucoder at hotmail.com> > > > > No one knows how to do this? > > > > C Bouzy wrote: > > > > > > Does anyone know how to set the color of a ListView selection bar color? I > > > know > > > it can be done without creating an owner drawn control, but I am not 100% > > > sure > > > how. > > > I am using Win32Lib.... > I can use LVM_SETTEXTBKCOLOR, LVM_SETTEXTCOLOR, and LVM_SETBKCOLOR > (which do not > affect the selection bar colour), however I noticed LVM_SETSELECTIONMARK > for which > I cannot find any documentation. Does that ring a bell? > > Regards, > Pete > -- > > petelomax at fastmail.fm > > -- > <a href="http://www.fastmail.fm">http://www.fastmail.fm</a> - Accessible with > your email software > or over the web > > Hi there Pete, I think the set selection mark thing only sets the first item in a set of selected items. It shouldnt affect the color in any way. Take care, Al And, good luck with your Euphoria programming! My bumper sticker: "I brake for LED's"
7. Re: ListView Selection Bar Color
- Posted by Al Getz <Xaxo at aol.com> Dec 06, 2005
- 572 views
- Last edited Dec 07, 2005
CChris wrote: > > Al Getz wrote: > > > > C Bouzy wrote: > > > > > > No one knows how to do this? > > > > > > C Bouzy wrote: > > > > > > > > Does anyone know how to set the color of a ListView selection bar color? > > > > I know > > > > it can be done without creating an owner drawn control, but I am not > > > > 100% sure > > > > how. > > > > I am using Win32Lib.... > > > > > > > > > ----If you continue to do what you have always done, > > > you will get what you have always gotten.---- > > > > Hello there, > > > > I searched the MS site and couldnt find anything on changing the > > selection bar color. It's possible there is no way to do this > > without going to an owner drawn style. > > > > > > Take care, > > Al > > > > And, good luck with your Euphoria programming! > > > > My bumper sticker: "I brake for LED's" > > > I didn't try it, but: > The color of a highlighted item in a control is a system color whose > identifier > is COLOR_HILIGHT. Using SetSysColor() (in the Window API), and passing it > this index into the system palette and the new desired color, you'll obtain > > what you wish, well almost. > > Almost, because the changes will be visible next time your control is painted > > again. > > Almost, because all windows visible at the time of the call will be affected. > The M$ doc recommends calling SetSysColor() whe the app window is maximised, > > for this reason. You can circumvent this by trapping WM_SYSCOLORCHANGE to let > > only your app know about it. > > Almost, because you must take care to save and restore the modified system > color when your app gains/loses focus. Otherwise, the results could be ... > interesting. > > I forgot to mention that the above applies to ay of the systel colors you can > > get by GetSysColors(). > > HTH > CChris Hi there, I've always found it strange what Windows API "Lets" you change and what it doesnt. It's like someone has to sit down one day and say: "ok, we wont let them change the color of this because we dont think it should change and what we think is better than what anybody else thinks". Strange too, because somewhere in the system dll it has to do: color=GetSystemColor(x) to get the color. One more stinky little function call: SetBarColor(color) and you could set the bar color of any control that has a selection bar, but noooo that would be too good :) Are they afraid someone will set it to the same color as the text and then the text wont be visible? I could think of a million other ways to screw up an app and they havent been afraid of that, and they sure weren't afraid of hackers when surfing with IE he he. Perhaps in Windows9000 op sys you'll be able to do it :) Take care, Al And, good luck with your Euphoria programming! My bumper sticker: "I brake for LED's"
8. Re: ListView Selection Bar Color
- Posted by C Bouzy <eucoder at hotmail.com> Dec 07, 2005
- 503 views
Using SkinCrafter and other similar skin libs allows you to do this with ease, the problem is SkinCrafter currently does not support customizing the selection bar in ListViews. It does support customizing the selection bar in a plain list control. I never understood why Windows did not allow the customizing of all controls without going through the trouble of owner draw controls. From what I hear Windows Vista will allow better customizing of controls. > Hi there, > > I've always found it strange what Windows API "Lets" you change and what > it doesnt. It's like someone has to sit down one day and say: > "ok, we wont let them change the color of this because we dont think > it should change and what we think is better than what anybody else > thinks". > Strange too, because somewhere in the system dll it has to do: > color=GetSystemColor(x) > to get the color. One more stinky little function call: > SetBarColor(color) > and you could set the bar color of any control that has a selection > bar, but noooo that would be too good :) > Are they afraid someone will set it to the same color as the text and > then the text wont be visible? I could think of a million other ways > to screw up an app and they havent been afraid of that, and they sure > weren't afraid of hackers when surfing with IE he he. > > Perhaps in Windows9000 op sys you'll be able to do it :) >