2010-09-08 141 views

回答

0

Tom,您必須設置Parent,AlignStretch屬性來填充圖像的自定義頁面背景。

嘗試這個代碼

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; 
+0

感謝,但仍然有相當大的餘量尤其是表面的左側? – Tom 2010-09-10 06:26:29

+0

有點老,但你解決這個問題嗎? – 2012-12-10 18:00:26

0

非常nousy做。 您必須在近3片

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

那麼精確切割的一大工作分割你的形象....