How to add TLabel to the menu bar in Delphi?

I use Beyond Compare (a great program), and was very impressed when it displayed the “New Version Available” shortcut in the menu bar. I clicked on it, opened the installation window for the new version, it was installed, the program restarted itself, and a new version appeared, and there was no more label.

I thought this was a great feature. The shortcut is in a prominent place in the menu bar where the user cannot skip it. I already received the update procedure, so all I had to do was add a shortcut. It should be easy.

Here is the label where I want it: (source: beholdgenealogy.com )The Label Where I Want It

... Wrong. I could not figure out how to add a shortcut there. The menu bar and the control area above it are areas for visual components. I could not put there alone.

But I know that this can be done because Beyond Compare is a Delphi program.

Can someone tell me what I have to do to put a TLabel in my menu bar, or at least make it appear above the menu bar in the right position?

For reference, I am using Delphi 2009.


Conclusion: Christopher seemed to correctly understand what the people at Beyond Compare were doing. I decided to implement the menu item, but without configuring its decision to "draw owner". This way, I don’t look like a hyperlink with a bold underline, but I also don’t lose all the automatic things (like Vista style) that the owner skips when drawing.

, "", "" .

, . , , , .

+5
2

, ?

, , " " , ?

http://sirmonkeys.com/images/updatelink.png
( Delphi 7)

procedure TForm1.MYITem1DrawItem(Sender: TObject; ACanvas: TCanvas;
  ARect: TRect; Selected: Boolean);
begin
  acanvas.Font.Style := [fsUnderline,fsbold];
  acanvas.Font.color := clblue;
  acanvas.Brush.Style := bsClear;
  acanvas.TextOut(arect.left+1,arect.top+1,'Link to Update...');
end;

procedure TForm1.MYITem1MeasureItem(Sender: TObject; ACanvas: TCanvas;
  var Width, Height: Integer);
begin
  width := 100;
end;

a, ImageList, MainMenu1.Images MainMenu1.OwnerDraw true.

+13

Beyond TLabel. Toolbar 2000 , ( ), , .

+2

All Articles