Multiple choice technology programming languages

A)TStaticText descends from TWinControl and has a window handle. B)TLabel descends from TWinControl but does not have window handle.

  1. A True and B False

  2. A False and B True

  3. A False and B False

  4. A True and B True

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

TStaticText descends from TWinControl and has its own window handle, which allows it to have more control over its appearance and behavior. TLabel descends from TGraphicControl, NOT TWinControl, and does NOT have its own window handle - it's drawn directly on its parent's surface for better performance. The statement claims B says 'TLabel descends from TWinControl but does not have window handle' which is FALSE because TLabel doesn't descend from TWinControl at all. Therefore 'A True and B False' is correct.

AI explanation

In the Delphi VCL, TStaticText does descend (indirectly) from TWinControl and therefore owns a real Windows handle (HWND) — statement A is true. TLabel, however, actually descends from TGraphicControl, not TWinControl, precisely because labels are lightweight, handle-less controls painted directly by their parent — so statement B's premise ('descends from TWinControl') is false, making the whole statement B false even though its tail clause ('does not have a window handle') is independently true. Since a compound statement is false if any part is false, B is False, matching 'A True and B False'.