zoukankan      html  css  js  c++  java
  • 使用 IntraWeb (14)

    
    
     
    TIWHRule    //一条横线, 对应 Html 中的 <hr/> TIWRectangle //矩形; 中间可以有行文本, 文本可任意对齐 


    TIWHRule 所在单元及继承链:
    IWHTMLControls.TIWHRule < TIWCustomControl < TIWBaseHTMLControl < TIWBaseControl < TIWVCLBaseControl < TControl < TComponent < TPersistent < TObject

    它没什么特别的成员, 下面是通过样式表把它改成红线:


    
    
     
    procedure TIWForm1.IWAppFormCreate(Sender: TObject); begin   IWHRule1.Width := Width div 2;   IWHRule1.Height := 3;   IWHRule1.Left := (Width - IWHRule1.Width) div 2;   IWHRule1.Top := 60;   IWHRule1.Anchors := [akLeft, akTop, akRight]; end; procedure TIWForm1.IWHRule1HTMLTag(ASender: TObject; ATag: TIWHTMLTag); begin   ATag.Params.Values['style'] := ATag.Params.Values['style'] + 'background-color: red; border:0;'; end; 



    TIWRectangle 所在单元及继承链:
    IWCompRectangle.TIWRectangle < TIWCustomRectangle < TIWCustomControl < TIWBaseHTMLControl < TIWBaseControl < TIWVCLBaseControl < TControl < TComponent < TPersistent < TObject

    主要成员:


    
    
     
    property BorderOptions: TIWBorderOptions //边框选项; 主要是 Width 和 Color property Color: TIWColor                //矩形的颜色 property Alignment: TAlignment          //文本水平对齐方式 property VAlign: TIWVerticalAlignment    //文本垂直对齐方式 property Text: TCaption                  //文本 


    示例:


    
    
     
    procedure TIWForm1.IWAppFormCreate(Sender: TObject); begin   IWRectangle1.BorderOptions.Width := 1;   IWRectangle1.BorderOptions.Color := $0000FF;   IWRectangle1.Color := $F0E0E0;   IWRectangle1.Text := '万一的 Delphi 博客';   IWRectangle1.Font.Color := $0000FF;   IWRectangle1.Font.Size := 16;   IWRectangle1.Alignment := taCenter;   IWRectangle1.VAlign := vaMiddle; end;
  • 相关阅读:
    Android中Webview与javascript的交互(互相调用)
    Android EditText横屏时软键盘不占据全屏
    Android 获取当前IP地址
    Android Dialog监听返回键!
    Android 显示特殊符号
    给EditText的drawableRight属性的图片设置点击事件
    Android 获取静态上下文(Application)
    Android dp和px之间进行转换
    Android 透明状态栏
    Android平台实现与Apache Tomcat服务器数据交互(MySql数据库)
  • 原文地址:https://www.cnblogs.com/martian6125/p/9630981.html
Copyright © 2011-2022 走看看