Board index » delphi » Menus and their backgrounds in Popup Windows

Menus and their backgrounds in Popup Windows

Hi,

Does anyone know how to change the background color of a popup menu to say
black then make it so when they hover over the text instead of the Default
Settings in your Windows OS it will change to like Green

The green would be for the selected item (Hover)

 

Re:Menus and their backgrounds in Popup Windows


You must set the ownerdraw o the menu to true and the with the ondrawitem
event of al menuitems paint your item to black.
In the parameters of ondrawitem you can check if the item is selected or not
so you can change the color.

--

Greatings,
Joost van der Waal
EMail : W...@Hotmail.Com

Agent <ch...@ugn3d.com> schreef in berichtnieuws
7r93uv$rl...@holly.prod.itd.earthlink.net...

Quote
> Hi,

> Does anyone know how to change the background color of a popup menu to say
> black then make it so when they hover over the text instead of the Default
> Settings in your Windows OS it will change to like Green

> The green would be for the selected item (Hover)

Re:Menus and their backgrounds in Popup Windows


You mind giving me a sample of the code to do it?
I am new to Delphi and do not know how to use Canvas

Joost van der Waal <W...@Hotmail.com> wrote in message
news:7r97sf$qp5$1@thor.wirehub.nl...

Quote
> You must set the ownerdraw o the menu to true and the with the ondrawitem
> event of al menuitems paint your item to black.
> In the parameters of ondrawitem you can check if the item is selected or
not
> so you can change the color.

> --

> Greatings,
> Joost van der Waal
> EMail : W...@Hotmail.Com

> Agent <ch...@ugn3d.com> schreef in berichtnieuws
> 7r93uv$rl...@holly.prod.itd.earthlink.net...
> > Hi,

> > Does anyone know how to change the background color of a popup menu to
say
> > black then make it so when they hover over the text instead of the
Default
> > Settings in your Windows OS it will change to like Green

> > The green would be for the selected item (Hover)

Other Threads