TMainMenu icons disappear after placing TMemo in the form

I have TMainMenu with icons. Everything is fine until I posted TMemo on the form. When I run my program, the icons disappeared. What happened and how can I fix this problem?

enter image description here

enter image description here

I am using Delphi 2010 as an IDE.

+4
source share
2 answers

The question is described in Sertac. Streaming a text note results in the loss of the icon from the menu bar.

Thus, the simplest and most appropriate solution is to make sure that the memo does not have text in the .dfm file. Set the text at run time after creating the form. For example, in the constructor or in the event handler OnCreate.

+3

VCL, TMenuItem.AppendTo. , IsOwnerDraw False, , GetImageList Nil, . , VCL, OwnerDraw = True TMainMenu .

EDIT: , OwnerDraw = True , Bitmap TMenuItems . , TImageList. OwnerDraw = False, .

+1

Source: https://habr.com/ru/post/1523496/


All Articles