TFrame is a VCL visual control acting as a container for components. It can be nested within forms or other frames. It is defined in Forms.pas unit.
Questions tagged [tframe]
72 questions
26
votes
5 answers
How to improve the use of Delphi Frames
I've used frames in Delphi for years, and they are one of the most powerful features of the VCL, but standard use of them seems to have some risk such as:
It's easy to accidentally move or edit the frame sub-components on a frame's host form…

Brian Frost
- 13,334
- 11
- 80
- 154
12
votes
4 answers
What is the accepted way to use frames in Delphi?
I was having my usual stroll around 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 which is:
Create a TFrame inside its unit.
Add that unit to the main…

Gustavo Carreno
- 9,499
- 13
- 45
- 76
11
votes
4 answers
Delphi: TFrame error No frames are available to insert
It happened to me, that the Delphi XE6 IDE forgot all of the TFrame descendants that I created in the past.
More specifically, when I click on Standard -> Frames, the dialog for choosing my frames does not show anymore.
Instead, it shows the…

Vlastimil Burián
- 3,024
- 2
- 31
- 52
11
votes
6 answers
The control 'xxx' has no parent window
I'm was trying to write a dll library in Delphi wih a function that creates an instance of a TFrame descendant and returns it. But when I imported this function in an application, every time I called it I would get an exception like "the 'xxx'…

Mariusz Schimke
- 3,185
- 8
- 45
- 63
11
votes
4 answers
Showing TFrame descendant's additional properties on the object inspector
Delphi object inspector doesn't show TFrame descendants's additional properties by design.
People tend to suggest using a known trick which is commonly used for showing TForm descendant's properties on the Object inspector. The trick is: registering…

Serguzest
- 1,287
- 10
- 18
9
votes
4 answers
Should I use delphi tframes for multi-pages forms?
I have some forms in my application which have different "states" depending on what the user is doing; for exemple when listing through his files the form displays some data about that file in a grid, but if he clicks on some button the grid is…

Lepidosteus
- 11,779
- 4
- 39
- 51
9
votes
4 answers
Why is my TScrollBox not showing scrollbars?
This seems like a very simple problem, but I cannot get a scrollbox to display scrollbars, and it is driving me crazy.
Here is the situation. I need to display a variable number of frames in a portion of a form. The area in which these frames are…

Cary Jensen
- 3,751
- 3
- 32
- 55
9
votes
2 answers
Why isn't my TFrame "seeing" a posted message?
I just recently begun using TFrames heavily (OK, yes, I've been living under a rock...). I thought frames supported Message hander method declaration--and I've seen many examples of that. So why does this simple test unit for a TFrame never see the…

Mark Wilsdorf
- 751
- 1
- 5
- 18
9
votes
2 answers
How to avoid issues when embedding a TForm in another TForm?
I often embed a TForm descendant into another TForm descendant like this:
var
Form1: TForm1;
Form2: TForm2;
begin
Form2.Parent := Form1;
Form2.BorderStyle := bsNone;
Form2.Align := alClient;
Form2.Show;
end;
Usually this…

Jens Mühlenhoff
- 14,565
- 6
- 56
- 113
7
votes
4 answers
How to simulate an OnDestroy event on a TFrame in Delphi?
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);…

Ian Boyd
- 246,734
- 253
- 869
- 1,219
7
votes
4 answers
Where to free dynamically allocated TFrame's components' objects?
I have a form containing a TFrame. The TFrame contains a ComboBox that is dynamically populated. Each ComboBox entry has an associated object. By the time the overridden destructor for the TFrame is called, the Items in the ComboBox have already…

user998198
- 133
- 7
7
votes
7 answers
Delphi, frames vs forms. What for multi-document interface?
yesterday I've started discussion on "MDI vs tabbed interface". I've asked whether should I continue developing my app as MDI-based, or should I embed the child forms into tab sheets.
Someone pointed that I should use TFrames instead... My question…

migajek
- 8,524
- 15
- 77
- 116
6
votes
1 answer
Delphi 7 - Handling MouseWheel events for Embedded Frames in Forms?
Hi I have a form with several frames inside.
For some of the frames, i wish to scroll the contents (or at least handle the mousewheel event).
I have tried the following:
Simply assigning a OnMouseWheel event handler for each frame
Overriding the…

Simon
- 9,197
- 13
- 72
- 115
6
votes
1 answer
Delphi: frame properties do not update when I expect them to (they get stuck)
I have a frame on a form. When I change the frame (add/delete buttons, labels) no changes appear on the form or controls have other positions in the form that in the frame. If to delete the frame from the form and add it again -> Ok.
Why? As I…

maxfax
- 4,281
- 12
- 74
- 120
6
votes
5 answers
Delphi IDE treating TFrame as if it were a Form
Every once in a while when I am tweaking my TFrame classes (adding properties, methods, etc), the IDE gets confused and acts as if it thinks the frame is a form, complete with header/caption, borders, etc. Yet, clearly the class is declared as a…

Jamo
- 3,238
- 6
- 40
- 66