TIWGradButton、TIWImageButton 分別是有顏色梯度變化按鈕和圖像按鈕.
TIWGradButton 所在單元及繼承鏈:
IWCompGradButton.TIWGradButton < TIWCustomControl < TIWBaseHTMLControl < TIWBaseControl < TIWVCLBaseControl < TControl < TComponent < TPersistent < TObject
主要成員:
property Style: TIWGradButtonStyle //
這個 Style 不大好調配, 可以復制官方示例中的設置:
效果圖:
TIWImageButton 所在單元及繼承鏈:
IWCompExtCtrls.TIWImageButton < TIWImageFile < TIWCustomImage < TIWCustomControl < TIWBaseHTMLControl < TIWBaseControl < TIWVCLBaseControl < TControl < TComponent < TPersistent < TObject
主要成員:
property ImageFile: TIWFileReference //圖像 property HotImageFile: TIWFileReference //當鼠標指向時顯示的圖像
測試代碼:
procedure TIWForm1.IWAppFormCreate(Sender: TObject);
begin
IWImageButton1.ImageFile.Filename := 'pic1.png'; //pic1.png、pic2.png 放在 wwwroot 目錄下
IWImageButton1.HotImageFile.Filename := 'pic2.png';
end;
procedure TIWForm1.IWImageButton1Click(Sender: TObject);
begin
WebApplication.GoToURL('http://del.cnblogs.com');
end;
