使用 IntraWeb (12) - 基本控件之 TIWGradButton、TIWImageButton



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;



免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM