Inno setup 在Inno设置中的按钮旁边添加文本

Inno setup 在Inno设置中的按钮旁边添加文本,inno-setup,Inno Setup,如何在“播放/静音”按钮旁边添加文本 这是我的剧本: 程序初始化; 开始 提取临时文件('tune.xm'); 如果BASS_Init(-144100,0,0,0)那么 开始 SoundStream:=BASS_StreamCreateFile(假, ExpandConstant({tmp}\tune.xm'),0,0,0,0, 编码标志或低音(采样循环); BASS_SetConfig(BASS_CONFIG_GVOL_STREAM,2500); 低音/通道播放(声音流,假); SoundC

如何在“播放/静音”按钮旁边添加文本

这是我的剧本:

程序初始化;
开始
提取临时文件('tune.xm');
如果BASS_Init(-144100,0,0,0)那么
开始
SoundStream:=BASS_StreamCreateFile(假,
ExpandConstant({tmp}\tune.xm'),0,0,0,0,
编码标志或低音(采样循环);
BASS_SetConfig(BASS_CONFIG_GVOL_STREAM,2500);
低音/通道播放(声音流,假);
SoundCtrlButton:=TNewButton.Create(WizardForm);
SoundCtrlButton.Parent:=WizardForm;
SoundCtrlButton.Left:=8;
SoundCtrlButton.Top:=WizardForm.ClientHeight-
SoundCtrlButton.高度-8;
SoundCtrlButton.宽度:=40;
SoundCtrlButton.标题:=
ExpandConstant(“{cm:SoundCtrlButtonCaptionSoundOff}”);
SoundCtrlButton.OnClick:=@SoundCtrlButtonClick;
结束;
结束;

与添加按钮的方式相同。创建一个新控件(),并通过将
WizardForm
分配给控件的
父属性将其添加到表单中

添加标签的基本代码是:

var
MyLabel:TLabel;
开始
MyLabel:=TLabel.Create(WizardForm);
MyLabel.Parent:=WizardForm;
MyLabel.Left:=。。。;
MyLabel.Top:=。。。;
标题:='…';
结束;
不使用代码将其放在一起,并相对于按钮定位标签:

procedure InitializeWizard();
变量
TuneLabel:TLabel;
开始
...
如果。。。然后
开始
...
SoundCtrlButton:=TNewButton.Create(WizardForm);
...
{正在创建新的TLabel控件}
TuneLabel:=TLabel.Create(WizardForm);
{将其添加到向导窗体}
TuneLabel.Parent:=WizardForm;
{设置标题}
TuneLabel.标题:='tune';
{将其与按钮右侧对齐}
TuneLabel.Left:=SoundCtrlButton.Left+SoundCtrlButton.Width+ScaleX(8);
{与按钮垂直对齐}
{仅在设置标题并自动调整标签大小后执行此操作。}
TuneLabel.顶部:=
SoundCtrlButton.Top+((SoundCtrlButton.Height-TuneLabel.Height)第2部分);
结束;
结束;

与添加按钮的方式相同。创建一个新控件(),并通过将
WizardForm
分配给控件的
父属性将其添加到表单中

添加标签的基本代码是:

var
MyLabel:TLabel;
开始
MyLabel:=TLabel.Create(WizardForm);
MyLabel.Parent:=WizardForm;
MyLabel.Left:=。。。;
MyLabel.Top:=。。。;
标题:='…';
结束;
不使用代码将其放在一起,并相对于按钮定位标签:

procedure InitializeWizard();
变量
TuneLabel:TLabel;
开始
...
如果。。。然后
开始
...
SoundCtrlButton:=TNewButton.Create(WizardForm);
...
{正在创建新的TLabel控件}
TuneLabel:=TLabel.Create(WizardForm);
{将其添加到向导窗体}
TuneLabel.Parent:=WizardForm;
{设置标题}
TuneLabel.标题:='tune';
{将其与按钮右侧对齐}
TuneLabel.Left:=SoundCtrlButton.Left+SoundCtrlButton.Width+ScaleX(8);
{与按钮垂直对齐}
{仅在设置标题并自动调整标签大小后执行此操作。}
TuneLabel.顶部:=
SoundCtrlButton.Top+((SoundCtrlButton.Height-TuneLabel.Height)第2部分);
结束;
结束;

Phew!这是我第一次做对了。我头疼:)非常感谢你@martin!呸!这是我第一次做对了。我头疼:)非常感谢你@martin!