Note that there are some explanatory texts on larger screens.

plurals
  1. POHow Do I Add A TLabel To The Menu Bar in Delphi?
    text
    copied!<p>I use <a href="http://www.scootersoftware.com/" rel="nofollow noreferrer">Beyond Compare</a> (a great program), and was very impressed when it displayed a "New Version Available" label on its Menu Bar. I clicked on it, up popped an install new version box, it installed, the program restarted itself and there was the new version and no more label.</p> <p>I thought that was a great feature. The label is there prominently on the menu bar where the user can't miss it. I've already got the update procedure, so all I had to do was add the label. That should be easy.</p> <p>Here's the label where I want it: <a href="http://www.beholdgenealogy.com/img/tlabel.jpg" rel="nofollow noreferrer">The Label Where I Want It http://www.beholdgenealogy.com/img/tlabel.jpg</a></p> <p>... Wrong. I couldn't figure out how to add a label there. The menu bar and the control area above it appear to be hands-off area for visual components. I couldn't place one there.</p> <p>But I know it can be done, because Beyond Compare is a Delphi program. </p> <p>Can anyone tell me what I have to do to put a TLabel in my Menu Bar or at least make it appear to be over the Menu Bar in the correct position?</p> <p>For reference, I use Delphi 2009.</p> <hr> <p>Conclusion: Christopher seems to have correctly figured out what the Beyond Compare people did. I've decided to implement the menu item, but without the customization of his "owner draw" solution. So I don't get the blue bold underline hyperlink look, but I also don't lose all the automatic things (like the Vista styling) that owner draw skips.</p> <p>To space the menu item over to the right, I've added an item after the "Help" that has the caption " " and is disabled.</p> <p>Thanks, Christopher. I was stuck thinking it must be a Label, but you saw around that.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload