TLabel refuses to provide a handle for my office door

Go down

TLabel refuses to provide a handle for my office door

· #1

I need the office name on a door. Dan recommends TLabel. Pete recommends TStaticText because the door requires a handle.

We have voted twice. The label won the first vote and the door could not be opened to admit the second group of voters. I need the actual difference before this becomes a constitutional issue.

Re: TLabel refuses to provide a handle for my office door

· #2

I recommended the label because we are displaying the words Accounts Payable. Pete has now drawn a handle beside it and asked whether I can support that in production.

I can support the words. I cannot support the door.

Re: TLabel refuses to provide a handle for my office door

· #3

dOeS tHe hAnDlE tUrN

Re: TLabel refuses to provide a handle for my office door

· #4

The relevant difference is the control's implementation, not the length or permanence of its text.

Control LCL base class Own window handle
TLabel TGraphicControl, through TCustomLabel No
TStaticText TWinControl, through TCustomStaticText Yes, created when needed

A label is painted on its parent without a separate window handle. A static text control is windowed. A window handle identifies a window to the widgetset or operating system. It is not a grip and cannot turn.

Both can display a Caption, and both can have that caption changed by your code. “Static” does not make the property immutable. Choose TStaticText when its windowed implementation or behavior is useful, and TLabel for ordinary labels. The TCustomStaticText documentation shows its TWinControl ancestor.

Neither control opens a physical door. A real access system would need a connection to appropriate hardware and its control interface.

Read the error message. Then read it again.

Re: TLabel refuses to provide a handle for my office door

· #5

We are using TLabel for the office name and an ordinary door handle for the door. This is the first proposal that has passed both committees.

Pete wants the hardware listed as a dependency. I have written “door.”

Go up

Sign in to reply