代码之家  ›  专栏  ›  技术社区  ›  Tom

带有全尺寸背景图片的Inno CustomPage

  •  0
  • Tom  · 技术社区  · 16 年前

    为什么我的位图不是全屏大小?

    BitmapImage1 := TBitmapImage.Create(Page);
    

    2 回复  |  直到 16 年前
        1
  •  0
  •   RRUZ    16 年前

    汤姆,你必须把灯调好 Parent , Align 和 Stretch

    请试用此代码

    var
      Page                 : TWizardPage;
      BackgroundBitmapImage: TBitmapImage;
      s: string;
    begin
     Page := CreateCustomPage(wpWelcome, 'Custom Page', 'Test');
     ExtractTemporaryFile('background.bmp');
     s:=ExpandConstant('{tmp}')+'\background.bmp';
     BackgroundBitmapImage := TBitmapImage.Create(Page);
     BackgroundBitmapImage.Bitmap.LoadFromFile(s);
     BackgroundBitmapImage.Parent := Page.Surface;
     BackgroundBitmapImage.Align:=alCLient;
     BackgroundBitmapImage.Stretch:=True; 
    end;
    
        2
  •  0
  •   user3442473    11 年前

    你必须把你的图像分成三块

    for WizardForm.MainPanel ( top strip of 60px)
    for WizardForm.InnerPage (Center panel around Surface)
    for mainPage.Surface (Inside inner Panel)
    

    推荐文章