Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: PopUpMenu canvas layout change


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Last Post: Dec 31, 2017 3:32 AM Last Post By: Lex Dean Threads: [ Previous | Next ]
Lex Dean

Posts: 132
Registered: 3/26/07
PopUpMenu canvas layout change  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 30, 2017 4:30 PM
I'm wanting to use Popupmenu to descend my menu from

I have a TStringlist of file names that is collected from the registry (resent file names)

now I want to list them with no dividers between file names and moderately tightly packed
Something similar to the Delphi IDE is a good example.

I understand procedure MeasureItem(ACanvas: TCanvas; var Width, Height: Integer); virtual;
with a fixed Height set in Message WM_MEASUREITEM can I override the message being sent to change the height

I'm not sure how to remove the dividing lines of each sub menu?
Peter Below

Posts: 1,227
Registered: 12/16/99
Re: PopUpMenu canvas layout change  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 31, 2017 12:30 AM   in response to: Lex Dean in response to: Lex Dean
Lex Dean wrote:

I'm wanting to use Popupmenu to descend my menu from

I have a TStringlist of file names that is collected from the
registry (resent file names)

now I want to list them with no dividers between file names and
moderately tightly packed Something similar to the Delphi IDE is a
good example.

I understand procedure MeasureItem(ACanvas: TCanvas; var Width,
Height: Integer); virtual; with a fixed Height set in Message
WM_MEASUREITEM can I override the message being sent to change the
height

I'm not sure how to remove the dividing lines of each sub menu?

A dropdown or popup menu only has dividers if you add them yourself. A
TMenuitem object (= the entries in a dropdown or popup menu) also has
OnMeasureItem and OndrawItem event, which you can use to draw the item
text in any font you want. Just keep in mind that not many people have
20:20 vision, I, for example, find the font size used by the IDE editor
dropdown of open files way too small for easy reading.

--
Peter Below
TeamB
Lex Dean

Posts: 132
Registered: 3/26/07
Re: PopUpMenu canvas layout change  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 31, 2017 3:16 AM   in response to: Peter Below in response to: Peter Below
ok well lines that separate text or menu item from another

I found I can take drawing and sizing messages from every MenuItem and point them to a method obtain the text and do anything I like basicly

Have to play

Edited by: Lex Dean on Dec 31, 2017 3:32 AM
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02