The style sheet has never been system. The Spring Festival holiday is free and you cannot wait.
To facilitate learning, I first wrote a style sheet test tool: csstest (click to download)
The tool is very simple, with about 10 lines writtenCode; Run:
Code file:
Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, extctrls, stdctrls, comctrls, olectrls, role; Type tform1 = Class (tform) memo1: tmemo; splitter1: tsplitter; Panel1: tpanel; webbrowser1: twebbrowser; Procedure formcreate (Sender: tobject); Procedure destroy (Sender: tobject; var action: tcloseaction ); procedure memo1change (Sender: tobject); end; var form1: tform1; implementation {$ R *. DFM} procedure tform1.formcreate (Sender: tobject); var path: string; begin text: = 'csstest '; webbrowser1.navigate ('about: blank'); memo1.scrollbars: = ssboth; with memo1.font do begin name: = 'verdana '; Size: = 10; color: = $000080; end; Path: = changefileext (paramstr (0 ),'. dat '); If fileexists (PATH) Then readcomponentresfile (path, memo1); end; Procedure tform1.formclose (Sender: tobject; var action: tcloseaction ); begin writecomponentresfile (changefileext (paramstr (0 ),'. dat '), memo1); end; Procedure tform1.memo1change (Sender: tobject); begin webbrowser1.navigate ('about:' + memo1.text); end.
Form file:
Object form1: tform1 left = 0 Top = 0 activecontrol = memo1 caption = 'form1 'clientheight = 231 clientwidth = 439 color = clbtnface font. charset = default_charset font. color = clwindowtext font. height =-11 font. name = 'tahoma 'font. style = [] oldcreateorder = false onclose = formclose oncreate = formcreate pixelsperinch = 96 textheight = 13 object splitter1: tsplitter left = 241 Top = 0 Height = 231 minsize = 1 explicitleft = 219 explicitheight = 196 end object memo1: tmemo left = 0 Top = 0 width = 241 Height = 231 align = alleft lines. strings = ('memo1') taborder = 0 onchange = memo1change end object Panel1: tpanel left = 244 Top = 0 width = 195 Height = 231 align = alclient bevelouter = bvnone caption = 'panel1' taborder = 1 object webbrowser1: twebbrowser left = 0 Top = 0 width = 195 Height = 231 align = alclient taborder = 0 explicitleft = 88 explicittop = 88 explicitwidth = 300 explicitheight = 150 controldata = {unknown limit 8000000000000000000000000000000000000000000000000000000000000000 00000000000000000100000000000000000000000000000000000000} end endend