How to Change the background color of Text?



How to Change the background color of Text?..

Answer / Ritu Raj Kumar

To change the background color of text in Delphi, you can use the TBrush class. Here is an example:n```delphinBrush1 := TBrush.Create(clWhite); // Creates a white brush.nMyLabel.Brush.Color := Brush1.Handle;n// Sets the label's background color to white.n```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Delphi Interview Questions

Define PRIMARYLANGID(), SUBLANGID(), and MAKELANGID() macros?

1 Answers  


How to tell if a form has been created (or any object)?

1 Answers  


How to change file attributes programmatically?

1 Answers  


How to Check for NULL in OnUpdateData handler ?

1 Answers  


How to close the CD Tray in code?

1 Answers  


Where is the file dsgnintf.pas?

2 Answers  


"DAX Error - Name not unique in this context" . what does this error mean?

1 Answers  


How to detect if a given key was pressed during application during startup?

1 Answers  


How to get the default Windows folders ?

1 Answers  


How to Create a PolyPolygon using a point array?

1 Answers  


How to access more than one table with the QuickRep component?

1 Answers  


How to adjust the tab location in a TMemo component ?

1 Answers  


Categories