Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2002.09.05;
Скачать: CL | DM;

Вниз

Изменить стандартный диалог   Найти похожие ветки 

 
smit_ ©   (2002-07-05 16:22) [0]

Возможно ли добавить свой элемент управления на стандартный диалог. Например в TPrintDialog кнопку "Настройка".


 
easy ©   (2002-07-05 16:33) [1]

//Add a Check Box to a Standard Dialog Box

{ For example, we have some dialog for confirmation and the user can check a checkbox ("Don"t show this message again") - program can store this in a global variable and the next time this dialog will not show. The idea of realization in the next: 1. we must create a dialog using CreateMessageDialog 2. this function will return a form object with dialog 3. in this object we can add a checkbox 4. show diallog using ShowModal 5. check a result and process a state of our checkbox 6. destroy a created checkbox and dialog object }

procedure TForm1.Button1Click(Sender: TObject);
var AMsgDialog: TForm; ACheckBox: TCheckBox;
begin AMsgDialog := CreateMessageDialog ("This is a test message.", mtWarning, [mbYes, mbNo]);
ACheckBox := TCheckBox.Create(AMsgDialog);
with AMsgDialog do
try Caption := "Dialog Title" ;
Height := 169;
with ACheckBox do
begin Parent := AMsgDialog;
Caption := "Dont show me again.";
Top := 121;
Left := 8;
end;
if (ShowModal = ID_YES) then
begin
if ACheckBox.Checked then
begin //... do if checked
end; //... do if NOT checked
end;
finally ACheckBox.Free;
Free;
end;
end;



Страницы: 1 вся ветка

Текущий архив: 2002.09.05;
Скачать: CL | DM;

Наверх




Память: 0.46 MB
Время: 0.013 c
14-14277
AL2002
2002-08-07 11:18
2002.09.05
Окончание


1-14051
maxim2
2002-08-27 07:21
2002.09.05
Как из colordialog получить цвет типа string


3-13893
DPetrovich
2002-08-14 15:46
2002.09.05
Выход из ADOQuery.BeforePost


1-14124
ErmSergey
2002-08-23 14:46
2002.09.05
Добавление событий


3-13880
Selax
2002-08-14 09:34
2002.09.05
Сохранение кэшированных изменений в подчиненных таблицах