Solved

How to change Popup menu colors,fonts..etc

Posted on 2000-04-16
4
408 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses
Course of the Month8 days, 22 hours left to enroll

615 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