Format an Edit Box (Form Designer)

Grade 12

This is a form-based problem — open it in the Form Designer, not the code judge. A button (btnFormat) and an edit box (edtOutput) are already on the form. Write btnFormat's OnClick handler so that clicking it sets edtOutput's text, enlarges its font, underlines it, and changes its background colour — entirely from code, using the properties every component exposes at runtime.

No input/output in the console sense. Grading clicks btnFormat once, then checks edtOutput.Text, edtOutput.Font.Size, edtOutput.Font.Style and edtOutput.Color against the values below. Required, after the click: - Text: 'Hello world' - Font.Size: 14 - Font.Style: underlined (fsUnderline) - Color: green (clGreen)

Format an Edit Box─ ▢ ✕
Result (set by code):
Format

3 components · drag to move, corner handle to resize, Delete to remove

Object Inspector

Select a component on the form to edit its properties.

Palette

Pick a component, then click the form

Standard

Additional

Data

Non-visual