Frederick Posted December 19, 2019 Share Posted December 19, 2019 I have two panels in a TUniStatusBar. The background colour of the control can be changed but I would like to control the visual appearance of individual panels. How do I change the background colour and the font colour and style of the each panel? -- Frederick (UniGUI Complete - Professional Edition 1.90.0.1514) Link to comment Share on other sites More sharing options...
Sherzod Posted December 20, 2019 Share Posted December 20, 2019 4 hours ago, Frederick said: How do I change the background colour and the font colour and style of the each panel? One possible solution I think. procedure TMainForm.UniFormReady(Sender: TObject); begin with UniStatusBar1.JSInterface do begin //[0] = Panels[0] JSCode(#1'.getRefItems()[0].setStyle("font-weight", "bold");'); JSCode(#1'.getRefItems()[0].setStyle("color", "red");'); JSCode(#1'.getRefItems()[0].setStyle("background-color", "yellow");'); //[1] = Panels[1] JSCode(#1'.getRefItems()[1].setStyle("font-weight", "bold");'); JSCode(#1'.getRefItems()[1].setStyle("color", "white");'); JSCode(#1'.getRefItems()[1].setStyle("background-color", "black");'); end; end; 1 Link to comment Share on other sites More sharing options...
Frederick Posted December 20, 2019 Author Share Posted December 20, 2019 Thanks. This works fine. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now