Solved

How to change Popup menu colors,fonts..etc

Posted on 2000-04-16
4
393 Views
Last Modified: 2013-12-03
I want to change the background color and the font color in my popup menus...I'd like to be able to do this using D2 and D3  I looked at a couple
of free components I found but they were really lame.. one did not allow
sub menu items using the free version and another would not install.. maybe someone here has modified a popup menu component to add font and color?

..Gwen..
0
Comment
Question by:Gwena
4 Comments
 
LVL 9

Expert Comment

by:ITugay
ID: 2720206
Hi Gwena,
It seems not possible to change color and font in standard TPopupMenu by easy way. You need to write your own class from TPopupMenu.  And draw menu items yourself. Set OwnerDraw to True to indicate that the application will draw menu items in an OnDrawItem event handler.
-----
Igor
0
 
LVL 3

Accepted Solution

by:
bryan7 earned 50 total points
ID: 2721512
hey Gwena, I remember I once did it.. look at the sources of RxLib .. there is a unit that shows how to change the popup menus' font color/name/size etc... about the background color.. sorry I have no idea

umm, sorry, I'm not sure now.. does the standard popup menu have a canvas property ? if so you can do:

with PopupMenu.Canvas.Font do begin
    Name := 'Courier New';
    Style := [fsBold];
    Size := 20;
    Color := clWhite;
  end;

I got from the RxDemo ..
0
 
LVL 3

Expert Comment

by:ckaneta
ID: 2723409
check out the Triton 2000 delphi components.
they have a popup menu where you can change the color of the popup menu and the font, can even set a bitmap as the background of the popup if you like

can get them at Torry's Delphi pages or
www.tritontools.com
0
 
LVL 5

Author Comment

by:Gwena
ID: 2761666
:-)
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi TcxGrid group footer summary 3 265
add combobox item based on numbers 9 141
how to center only a line in richedit? 4 57
TEMBEDDEDWB how can i change its user agent ? 8 58
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question