覆盖WizardSmallImage的最大大小 [英] Override the maximum size of WizardSmallImage

查看:73
本文介绍了覆盖WizardSmallImage的最大大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为正在制作的安装程序的WizardSmallImage设置自定义图像,但是,我遇到了一个问题:我试图使用的图像超出了WizardSmallImage的最大大小(55x58).由于我是为朋友做的,因此无法剪切/缩小他的图像.

I'm trying to set a custom image for the WizardSmallImage of a installer I'm making, but, I have run onto a problem: the image I'm trying to use exceeds the max size for WizardSmallImage (55x58). Since I'm doing this for a friend, I can't cut/shrink his image.

那么,有什么方法可以覆盖这个最大大小吗? 我试图通过在[代码]部分中编写以下代码来手动更改WizardForm.WizardSmallBitmapImage的属性:

So, is there any way to override this max size? I have tried to change the properties of WizardForm.WizardSmallBitmapImage manually by writing this code in the [Code] section:

procedure InitializeWizard;
begin
  WizardForm.WizardSmallBitmapImage.Stretch := false;
  WizardForm.WizardSmallBitmapImage.Width := 150
end;

但这没用...

如果有人可以回答我,我将非常感激!

If anyone could answer me, I would be really grateful!!

推荐答案

当您增加WizardSmallBitmapImageWidth时,它会重叠在窗口的右边缘.您也必须将其向左移动.

When you increase Width of WizardSmallBitmapImage it overlaps right edge of the window. You have to move it to the left too.

如果需要使其过宽(150),还需要使左侧的标签(PageDescriptionLabelPageNameLabel)更加狭窄.

If you need to make it too wide (150), you also need to make the labels (PageDescriptionLabel and PageNameLabel) to the left more narrow.

procedure InitializeWizard;
var Diff: Integer;
begin
    ....
    Diff := ScaleX(150) - WizardForm.WizardSmallBitmapImage.Width;
    WizardForm.WizardSmallBitmapImage.Width := 
        WizardForm.WizardSmallBitmapImage.Width + Diff
    WizardForm.WizardSmallBitmapImage.Left :=
        WizardForm.WizardSmallBitmapImage.Left - Diff;
    WizardForm.PageDescriptionLabel.Width := 
        WizardForm.PageDescriptionLabel.Width - Diff;
    WizardForm.PageNameLabel.Width := 
        WizardForm.PageNameLabel.Width - Diff;
    ...
end;

这篇关于覆盖WizardSmallImage的最大大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆