tframe

Loaded procedure executed twice for TFrame's descendant

穿精又带淫゛_ 提交于 2021-02-10 08:10:59
问题 I've registered as component a TFrame 's descendant class and I've noticed that the Loaded procedure is executed twice: Runtime: TMyFrame = class(TFrame) private protected procedure Loaded(); override; public constructor Create(AOwner : TComponent); override; end; constructor TMyFrame.Create(AOwner : TComponent); begin ShowMessage('Before TMyFrame.Create'); inherited Create(AOwner); ShowMessage('After TMyFrame.Create'); end; procedure TMyFrame.Loaded(); begin ShowMessage('Before TMyFrame

Deleting TFrame from form at run time

我只是一个虾纸丫 提交于 2020-02-04 11:50:11
问题 I am using C++ Builder to create a VCL form application. Right now I have a TFrame containing a bunch of components and it looks like this... I also have a button call "Add". Basically every time I press that Add button on the form, a new TFrame is added to it and below the previous one making something that looks like a table. And in order to add duplicates I have to rename the TFrame each time before it is created. int __fastcall TForm1::AddMapCells(void) { Num++; TFrame1 * MyFrame = new

Load Frames from packages

不羁的心 提交于 2020-01-07 06:24:12
问题 I have three frames inside separate three bpls, in my main application i have created three buttons and , i want to call the frames dynamically(one at a time )when the respective button is clicked (the frame can be shown in any control eg : TPanal) i have already done such a thing using Dlls but some in the Stack overflow community recommended me to use bpl (they said it is easy ), my previous post 回答1: Here there's an article about loading a form from a package (bpl file): http://edn

What is the accepted way to use frames in Delphi?

僤鯓⒐⒋嵵緔 提交于 2020-01-01 09:12:10
问题 I was having my usual stroll around SO and bumped on some frames discussions. I'm mainly a Delphi hobbyist and not a professional so I had to learn how to use TFrames my own way witch is: Create a TFrame inside it's unit. Add that unit to the main form Uses clause. Have a private variable of that TFrame's type OnCreate of the form instanciates the TFrame and attaches it to a TPanel both on the Create and .Parent On one of my Actions set that TFrame.Visible := True and .BringToFront. This is

How to simulate an OnDestroy event on a TFrame in Delphi?

两盒软妹~` 提交于 2019-12-31 17:55:50
问题 How can i simulate an OnDestroy event for a TFrame in Delphi? i nievely added a constructor and destructor to my frame, thinking that is what TForm does: TframeEditCustomer = class(TFrame) ... public constructor Create(AOwner: TComponent); override; destructor Destroy; override; ... end; constructor TframeEditCustomer.Create(AOwner: TComponent) begin inherited Create(AOwner); //allocate stuff end; destructor TframeEditCustomer.Destroy; begin //cleanup stuff inherited Destroy; end; The problem

Tree Structure with TFrames

喜你入骨 提交于 2019-12-24 16:42:41
问题 sry i couldn't draw any better with paint. what i am trying to do here is create a tree structure (like the one in the picture) using TFrames. and basically when i press the + buttons, a new TFrame would be added to the tree. I am using C++ Builder, and I know how to do the adding of the TFrame, my problem is i don't know how to draw the green lines of the tree. thanks in advanced. 来源: https://stackoverflow.com/questions/9212994/tree-structure-with-tframes

Tree Structure with TFrames

ⅰ亾dé卋堺 提交于 2019-12-24 16:42:31
问题 sry i couldn't draw any better with paint. what i am trying to do here is create a tree structure (like the one in the picture) using TFrames. and basically when i press the + buttons, a new TFrame would be added to the tree. I am using C++ Builder, and I know how to do the adding of the TFrame, my problem is i don't know how to draw the green lines of the tree. thanks in advanced. 来源: https://stackoverflow.com/questions/9212994/tree-structure-with-tframes