tpanel is a VCL control implementing a generic panel control.It is defined in ExtCtrls.pas unit.
Questions tagged [tpanel]
45 questions
20
votes
7 answers
Delphi: How to programmatically adjust visual ordering of components with align = alTop
I've got a form with a number of panels, each of which has Align=alTop, so they stack down nicely from the top of the form.
However, I want to dynamically change the appearance order of these panels - i.e, move them up and down. What's the best way…

Roddy
- 66,617
- 42
- 165
- 277
8
votes
2 answers
How to eliminate the flicker on the right edge of TPaintBox (for example when resizing)
Summarization:
Say that I have a TForm and two panels. The panels are aligned alTop and alClient. The alClient panel contains a TPaintBox, whose OnPaint involve drawing codes.
The default value of DoubleBuffered on the components are false.
During…

SOUser
- 3,802
- 5
- 33
- 63
8
votes
2 answers
make a Delphi TPanel caption wrap
Is there a way to wrap the text in a TPanel.Caption in Delphi (in my case Delphi 6)?

wonderer
- 3,487
- 11
- 49
- 59
7
votes
3 answers
How best to create a TPanel with a close 'cross' button in the top right?
There are several third-pary controls (such as the Raize Components) which have a close 'cross' button 'option' (eg the page control). My requirement is simpler, I'd like to plonk a cross 'button' aligned top right on to a TPanel and access its…

Brian Frost
- 13,334
- 11
- 80
- 154
6
votes
4 answers
How to draw on a TPanel
I need to draw on a TPanel, ideally directly so I don't have another component on top of it getting in the way of mousevent-event trapping (I want to draw a little "size-grip" on it). How should I go about doing this?

Jamo
- 3,238
- 6
- 40
- 66
6
votes
4 answers
how do I avoid this unwanted behaviour with Delphi's TSplitter and panels?
Included is a small project demonstrating my problem. I have a TPageControl aligned to the main form. On each of two tabsheets I have panels client aligned. On each of those panels I have 2 subpanels and a splitter. The LH panel and splitter is…

rossmcm
- 5,493
- 10
- 55
- 118
6
votes
1 answer
Cannot catch all clicks when using onmousedown, onmouseup and click events
I'm trying to create a custom button out of a TPanel component. For this, I have provided an override for the onmousedown and onmouseup events (to do some drawing), and I've used the onclick event to handle the clicks.
Unfortunately, if I rapidly…

Joe
- 65
- 3
6
votes
2 answers
When to use TPanel FullRepaint?
I noticed that the resize flicker gets much better when I set TPanel.FullRepaint to False. Since the property exists and is True by default, there must be some reason for that.
How to decide whether it should be set or not?
The help just…

Jens Mühlenhoff
- 14,565
- 6
- 56
- 113
4
votes
2 answers
How to remove completely the Panel border in delphi?
In my application, i've created a signup form and i need to show an Error Icon whenever an Edit is empty or contain some error. But the image haven't a Name property and therefor i am unable to to call the Hide the image by its name. Therefore i…

Rafik Bari
- 4,867
- 18
- 73
- 123
4
votes
1 answer
Delphi Panels and custom component Z order issue
I'm working on a personal project and I have been running into lots of issues lately resulting in many questions, but hey, thats what SO is for right? ;)
Anyhow I tried making a transparent TPanel which I achieved by making a custom component.
The…

Teun Pronk
- 1,367
- 12
- 24
4
votes
3 answers
Create an exact copy of TPanel on Delphi5
I have a TPanel pnlMain, where several dynamic TPanels are created (and pnlMain is their Parent) according to user actions, data validations, etc. Every panel contains one colored grid full of strings. Apart from panels, there are some open source…

smok1
- 2,940
- 26
- 35
3
votes
2 answers
How to print TPanel contents?
I have TPanel. On this Panel there is an TImage descendant , few other panels with controls, etc. In fact, picture contains some diagram, while additional panels with labels are created during runtime to provide user with additional info.
Recently I…

smok1
- 2,940
- 26
- 35
3
votes
3 answers
Delphi - Duplicate tpanel and tbuttons on second form
On my main form I have a TPanel containing buttons that act as a toolbar. I want to clone/copy this toolbar and the buttons and their functionality to a second form.
Cloning the menu was simple using newmenu.merge(mainmenu). That was an excellent…

TallGuy
- 33
- 3
2
votes
0 answers
TPanel.AutoSize does not work in a particular situation
In a Delphi 10.4.2 Win32 VCL Application on Windows 10, I use a TPanel with AutoSize = True.
The documentation says:
When AutoSize is True, the control resizes automatically when its contents change.
However, this is not the case when the size of…

user1580348
- 5,721
- 4
- 43
- 105
2
votes
2 answers
Controls on top, like TPanel can do?
My program is doing a time consuming task, and I would like to display a TImage in the middle of the application window, but it will not stay on top - my VST is always on top. However, when I use a TPanel, it stays on top? How can I make my TImage…

Jeff
- 12,085
- 12
- 82
- 152