Смотрите видео ниже, чтобы узнать, как установить наш сайт в качестве веб-приложения на домашнем экране.
Примечание: Эта возможность может быть недоступна в некоторых браузерах.
Если я не ошибаюсь, то вот:А что на счёт кнопочек?
Как вставить текстуры на Next,Back,Cancel Buttons?
const
ButtonWidth = 80;
ButtonHeight = 23;
var
WizardLabel: TLabel;
ButtonPanel: array of TPanel;
ButtonImage: array of TBitmapImage;
ButtonLabel: array of TLabel;
UsedButtons: array of TButton;
ButtonsCount: Integer;
procedure ButtonLabelClick(Sender: TObject);
var Button: TButton; n, i: Integer;
begin
i:= TLabel(Sender).Tag; ButtonImage[i].Left:= 0
for n:=0 to (ButtonsCount-1) do begin
if i = n then Button:= UsedButtons[n];
end;
Button.OnClick(Button)
end;
procedure ButtonLabelMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
if ButtonLabel[TLabel(Sender).Tag].Enabled then ButtonImage[TLabel(Sender).Tag].Left:=-ButtonWidth*2
end;
procedure ButtonLabelMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
if ButtonLabel[TLabel(Sender).Tag].Enabled then ButtonImage[TLabel(Sender).Tag].Left:=0
end;
procedure ButtonLabelMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
var n, I: Integer;
begin
I:=TLabel(Sender).Tag;
///Сначала восстанавливаем картинку у всех кнопок, так надо иначе могут быть глюки
for n:=0 to (ButtonsCount-1) do begin if (ButtonLabel[n].Enabled)and(ButtonImage[n].Left <> -ButtonWidth*2)and(I<>N) then ButtonImage[n].Left:= 0; end;
///Теперь собственно ставим нужную картинку
if (ButtonLabel[I].Enabled)and(ButtonImage[I].Left <> -ButtonWidth*2) then begin ButtonImage[I].Left:= -ButtonWidth; end;
end;
procedure WizardLabelMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
var n: Integer;
begin
///Т.к Sender'ом выступает WizardLabel то не получится испльзовать индекс кнопки
for n:=0 to (ButtonsCount-1) do if (ButtonLabel[n].Enabled)and(ButtonImage[n].Left <> -ButtonWidth*2) then begin ButtonImage[n].Left:= 0; end;
end;
procedure LoadButtonImage(AButton: TButton);
var n: Integer;
begin
n:=ButtonsCount; SetArrayLength(ButtonPanel, n+1);
SetArrayLength(ButtonImage, n+1); SetArrayLength(ButtonLabel, n+1);
SetArrayLength(UsedButtons, n+1); UsedButtons[n]:= AButton;
ButtonPanel[n]:=TPanel.Create(WizardForm)
ButtonPanel[n].SetBounds(AButton.Left, AButton.Top, AButton.Width, AButton.Height)
ButtonPanel[n].Tag:= n
ButtonPanel[n].Enabled:= AButton.Enabled
ButtonPanel[n].Parent:=AButton.Parent
ButtonImage[n]:=TBitmapImage.Create(WizardForm)
ButtonImage[n].SetBounds(ScaleX(0), ScaleY(0), ScaleX(320), ScaleY(23))
ButtonImage[n].Enabled:=False
ButtonImage[n].Bitmap.LoadFromFile(ExpandConstant('{tmp}\Button2.bmp'))
ButtonImage[n].Parent:=ButtonPanel[n]
with TLabel.Create(WizardForm) do begin
Tag:=n
Parent:=ButtonPanel[n]
Width:=AButton.Width
Height:=AButton.Height
Transparent:=True
OnClick:=@ButtonLabelClick
OnDblClick:=@ButtonLabelClick
OnMouseMove:=@ButtonLabelMove
OnMouseDown:=@ButtonLabelMouseDown
OnMouseUp:=@ButtonLabelMouseUp
end;
ButtonLabel[n]:=TLabel.Create(WizardForm)
ButtonLabel[n].Autosize:=True
ButtonLabel[n].Alignment:=taCenter
ButtonLabel[n].Tag:=n
ButtonLabel[n].Enabled:= AButton.Enabled
ButtonLabel[n].Transparent:=True
ButtonLabel[n].Font.Color:=clWhite
ButtonLabel[n].Caption:=AButton.Caption
ButtonLabel[n].OnClick:=@ButtonLabelClick
ButtonLabel[n].OnDblClick:=@ButtonLabelClick
ButtonLabel[n].OnMouseMove:=@ButtonLabelMove
ButtonLabel[n].OnMouseDown:=@ButtonLabelMouseDown
ButtonLabel[n].OnMouseUp:=@ButtonLabelMouseUp
ButtonLabel[n].Parent:=ButtonPanel[n]
ButtonsCount:= ButtonsCount+1
end;
procedure UpdateButtons();
var n: Integer;
begin
for n:=0 to ButtonsCount-1 do begin
ButtonLabel[n].Caption:=UsedButtons[n].Caption
ButtonPanel[n].Visible:=UsedButtons[n].Visible
if (UsedButtons[n].Enabled = False) then ButtonImage[n].Left:= -ButtonWidth*3 else ButtonImage[n].Left:= 0;
ButtonLabel[n].Enabled:= UsedButtons[n].Enabled;
ButtonPanel[n].Enabled:= UsedButtons[n].Enabled;
///Ставим Left и Top лейбла соразмерно размеру лейбла
ButtonLabel[n].Left:= ButtonPanel[n].Width div 2 - ButtonLabel[n].Width div 2;
ButtonLabel[n].Top:= ButtonPanel[n].Height div 2 - ButtonLabel[n].Height div 2;
end;
end;
procedure LicenceAcceptedRadioOnClick(Sender: TObject);
begin
///Делаем кнопку активной
WizardForm.NextButton.Enabled:= True;
///Обновляем текстурированную кнопку (обновляем активность и текстуру)
UpdateButtons();
end;
procedure LicenceNotAcceptedRadioOnClick(Sender: TObject);
begin
///Делаем кнопку неактивной
WizardForm.NextButton.Enabled:= False;
///Обновляем текстурированную кнопку (обновляем активность и текстуру)
UpdateButtons()
end;
procedure InitializeWizard();
begin
WizardLabel:= TLabel.Create(WizardForm)
WizardLabel.SetBounds(ScaleX(0), ScaleY(0), ScaleX(WizardForm.Width), ScaleY(WizardForm.Height))
WizardLabel.Transparent:= True;
WizardLabel.AutoSize:=false;
WizardLabel.OnMouseMove:=@WizardLabelMove
WizardLabel.Parent:= WizardForm;
WizardForm.BackButton.Width:= ButtonWidth
WizardForm.BackButton.Height:= ButtonHeight
WizardForm.NextButton.Width:= ButtonWidth
WizardForm.NextButton.Height:= ButtonHeight
WizardForm.CancelButton.Width:=ButtonWidth
WizardForm.CancelButton.Height:= ButtonHeight
WizardForm.DirBrowseButton.Left:=ScaleX(337)
WizardForm.DirBrowseButton.Width:= ButtonWidth
WizardForm.DirBrowseButton.Height:=ButtonHeight
WizardForm.GroupBrowseButton.Left:=ScaleX(337)
WizardForm.GroupBrowseButton.Width:= ButtonWidth
WizardForm.GroupBrowseButton.Height:=ButtonHeight
WizardForm.LicenseAcceptedRadio.OnClick:=@LicenceAcceptedRadioOnClick
WizardForm.LicenseNotAcceptedRadio.OnClick:=@LicenceNotAcceptedRadioOnClick
ExtractTemporaryFile('button2.bmp')
LoadButtonImage(WizardForm.BackButton)
LoadButtonImage(WizardForm.NextButton)
LoadButtonImage(WizardForm.CancelButton)
LoadButtonImage(WizardForm.DirBrowseButton)
LoadButtonImage(WizardForm.GroupBrowseButton)
end;
procedure CurPageChanged(CurPageID: Integer);
begin
UpdateButtons()
end;[/SOURCE][/SPOILER]
Взято из Inno Setup Faq ©
я так понял, что товарищу deaddima, нужен пример текстурирования кнопок через ботву (который, кстати, тоже имеется в факе):Если я не ошибаюсь, то вот:
Вот ссылка на фак.можно исходную ссылку?
небось "[_Code]" не додумался переименовать?а то при компеляции ошибку выдает
если тебе нужен новый Edit / ProgressPar / Label то да, нужно создавать.Edit, ProgressBar,Label и так далее нужно самому создавать?
WizardForm.DirEdit.Parent:= WizardForm.WelcomePage;как сделать так чтобы определённый элемент,скажем Edit появлялся на определённой странице
кнопочка Обзор находится на каждой странице...а я хочу чтоб была на SelectDirPage
Procedure CurPageChanged(CurPageID: Integer);
begin
BtnSetVisibility(HDirBrowseButton, False);
case CurPageID of
wpSelectDir: begin
BtnSetVisibility(HDirBrowseButton, True);
end;
end;
ImgApplyChanges(WizardForm.Handle);
end;
инструменты --> генерация GUID, если я не ошибаюсь)Как генерировать AppID?
Что то не понял можно по подробнее?Darck, была точно такая же проблема на Win 8 (x64). Поставил на unarc.exe & precomp.exe из папки распаковки доступ от имени администратора. Помогло.