RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TMenuItem.NewTopLine Method

Inserts a separator bar at the beginning of the Items property array.

Pascal
function NewTopLine: Integer;
C++
__fastcall int NewTopLine();

Use NewTopLine to insert a separator bar at the beginning of the items property array. This is useful when building up submenus dynamically at runtime. 

NewTopLine returns the index of the newly inserted separator item in the Items property array.

Tip: When inserting separator bars at runtime, it is a good idea to set AutoLineReduction to true so that superfluous separators can be automatically removed.
 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!