Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
LCL
»
[Solved] Height of TLabel inside custom TPanel
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Questions about TFuncSeri...
by
wp
[
Today
at 07:11:52 pm]
Saving a workbook with mu...
by
wp
[
Today
at 06:46:28 pm]
Purpose of TProcessUTF8
by
Thaddy
[
Today
at 06:43:25 pm]
[Solved] Set TSpeedButton...
by
jcmontherock
[
Today
at 04:08:22 pm]
[SOLVED] Set horizontal s...
by
rvk
[
Today
at 03:57:47 pm]
Hello! Anything new?
by
Nimbus
[
Today
at 01:51:43 pm]
could Ardour's YTK be use...
by
robert rozee
[
Today
at 01:37:44 pm]
How many lines is too man...
by
440bx
[
Today
at 12:51:24 pm]
[revisited] triple click
by
dbannon
[
Today
at 12:27:18 pm]
Update a table with an Au...
by
Zvoni
[
Today
at 12:22:58 pm]
The growth of computers
by
marcov
[
Today
at 10:12:39 am]
Configuration issues rega...
by
Martin_fr
[
Today
at 08:05:38 am]
[SOLVED] TCP/IP Question
by
valdir.marcos
[
Today
at 05:03:12 am]
Update fpexprpars
by
valdir.marcos
[
Today
at 04:52:27 am]
C/C++ code to Object Pasc...
by
Curt Carpenter
[
Today
at 03:58:28 am]
Win 11, strange position ...
by
d7_2_laz
[March 08, 2026, 11:13:04 pm]
Lazarus for Windows on aa...
by
msintle
[March 08, 2026, 09:23:01 pm]
Lazarus Bugfix Release 4....
by
Martin_fr
[March 08, 2026, 08:17:00 pm]
Debian removes FPC/Lazaru...
by
Schmitty2005
[March 08, 2026, 07:56:33 pm]
[SOLVED] ??? I don't even...
by
n7800
[March 08, 2026, 07:29:19 pm]
how to rename/save a seco...
by
valdir.marcos
[March 08, 2026, 07:25:59 pm]
How to run an external co...
by
valdir.marcos
[March 08, 2026, 07:07:31 pm]
Qt6/Wayland clipboard: pa...
by
Fred vS
[March 08, 2026, 07:02:05 pm]
NIL vs. Assign: when to u...
by
valdir.marcos
[March 08, 2026, 06:22:05 pm]
lazarus in new england
by
valdir.marcos
[March 08, 2026, 06:10:02 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [Solved] Height of TLabel inside custom TPanel (Read 1895 times)
lainz
Hero Member
Posts: 4741
Web, Desktop & Android developer
[Solved] Height of TLabel inside custom TPanel
«
on:
April 09, 2018, 09:23:16 pm »
Hi, my custom control is located here
https://github.com/Arandusoft/fpcpaymowidget/tree/master/controls
As well as a simple test project
https://github.com/Arandusoft/fpcpaymowidget/tree/master/controls/test_autocomplete
Is an autocomplete control that uses a Label, an Edit and a ListBox.
What I need is to know the height of the Label in the Create event of the component (
https://github.com/Arandusoft/fpcpaymowidget/blob/master/controls/autocompletepanel.pas#L166
):
Code: Pascal
[Select]
[+]
[-]
FLabel
.
Height
Because I set the height of the component based on
Code: Pascal
[Select]
[+]
[-]
Height
:
=
FLabel
.
Height
+
FEdit
.
Height
;
But seems that FLabel.Height is not known in the Create event yet. And also there is no Canvas available to at least try to measure the height.
It's a bug? There is a way to get the Label height on Create?
Thanks.
«
Last Edit: April 09, 2018, 09:49:56 pm by lainz
»
Logged
https://lainz.github.io/
lainz
Hero Member
Posts: 4741
Web, Desktop & Android developer
Re: Height of TLabel inside custom TPanel
«
Reply #1 on:
April 09, 2018, 09:49:42 pm »
Solved.
It was that I did not call:
Code: Pascal
[Select]
[+]
[-]
SetInitialBounds
(
0
,
0
,
200
,
FLabel
.
Height
+
FEdit
.
Height
)
;
But height of label is available, maybe I get confused by not rebuilding the IDE?
Logged
https://lainz.github.io/
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
LCL
»
[Solved] Height of TLabel inside custom TPanel
TinyPortal
© 2005-2018