IntraWeb(13)-基本コントロールのTIWLabel、TIWLink、TIWURL、TIWURLWindowの使用

4198 ワード


TIWLabel     //
TIWLink      //    
TIWURL       //    
TIWURLWindow //    ,    <iframe></iframe>
TIWLabel所在ユニット及び継承チェーン:
IWCompLabel.TIWLabel < TIWCustomLabel < TIWCustomControl < TIWBaseHTMLControl < TIWBaseControl < TIWVCLBaseControl < TControl < TComponent < TPersistent < TObject
主要メンバー:

property AutoSize: Boolean       //    
property Caption: TCaption       //   Text   
property RawText: Boolean        //= True  ,    Caption    Html    
property ConvertSpaces: Boolean  //      ;    False,              
property NoWrap: Boolean         // = False   ConvertSpaces = False   AutoSize = False  ,    
property ForControl: TIWCustomControl  //           ;    ,     Label         
RawText属性テスト:

procedure TIWForm1.IWAppFormCreate(Sender: TObject);
begin
  IWLabel1.RawText := True;
  IWLabel1.Caption := '<a href="http://del.cnblogs.com">    Delphi   </a>';
end;
TIWLink所在ユニット及び継承チェーン:
IWHTMLControls.TIWLink < TIWLinkBase < TIWCustomControl < TIWBaseHTMLControl < TIWBaseControl < TIWVCLBaseControl < TControl < TComponent < TPersistent < TObject
主要メンバー:

property Confirmation: string  //
property DoSubmitValidation: Boolean  //
property RawText: Boolean   //
property Caption: TCaption  //
property RawText: Boolean   //

property OnClick: TNotifyEvent  //
TIWLinkの例:

uses Unit2;

procedure TIWForm1.IWLink1Click(Sender: TObject);
begin
  TIWForm2.Create(WebApplication).Show;
end;
TIWURL所在ユニット及び継承チェーン:
IWHTMLControls.TIWURL < TIWLinkBase < TIWCustomControl < TIWBaseHTMLControl < TIWBaseControl < TIWVCLBaseControl < TControl < TComponent < TPersistent < TObject
主要メンバー:

property TargetOptions: TIWURLTarget //      
property TerminateApp: Boolean //   ,         
property URL: string         //    
property UseTarget: Boolean  //        
property RawText: Boolean    //
property Caption: TCaption   //

  TIWURLTarget     :
  property Left: Integer
  property Top: Integer
  property Width: Integer
  property Height: Integer
  property WindowName: string
  property AddressBar: Boolean
  property Menu: Boolean
  property Resizable: Boolean
  property Scrollbars: Boolean
  property Toolbar: Boolean
  property Mode: TIWURLTargetMode //TIWURLTargetMode = (tmBlank, tmNewWindow, tmParent, tmSelf, tmTop)
  function GetModeString(AMode: IWHTMLControls.TIWURLTargetMode): string
TIWURLの例:

{       }
procedure TIWForm1.IWAppFormCreate(Sender: TObject);
begin
  IWURL1.URL := 'http://www.cnblogs.com/del';
end;

{      }
procedure TIWForm1.IWAppFormCreate(Sender: TObject);
begin
  IWURL1.URL := 'http://www.cnblogs.com/del';
  IWURL1.UseTarget := True;
  IWURL1.TargetOptions.Top := 0;
  IWURL1.TargetOptions.Left := 0;
end;

{      }
procedure TIWForm1.IWAppFormCreate(Sender: TObject);
begin
  IWURL1.URL := 'http://www.cnblogs.com/del';
  IWURL1.UseTarget := True;
  IWURL1.TargetOptions.Mode := tmSelf;
end;
TIWURLWindowが存在するユニットおよび継承チェーン:
IWHTMLControls.TIWURLWindow < TIWCustomControl < TIWBaseHTMLControl < TIWBaseControl < TIWVCLBaseControl < TControl < TComponent < TPersistent < TObject
主要メンバー:

property URI: string  //  
property Border: Boolean  //     
property Scrolling: TIWURLWindowScrolling //       : usYes、usNo、usAuto
TIWLinkの例:

procedure TIWForm1.IWAppFormCreate(Sender: TObject);
begin
  IWURLWindow1.URI := 'http://del.cnblogs.com';
  IWURLWindow1.Border := True;
  IWURLWindow1.Align := alLeft;
end;