Graphic CSS (1): first create a style sheet test tool

Source: Internet
Author: User
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
 
  
 
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.