mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 21:00:43 +02:00
AJ:Fixes to PromptUser;Switched ShowMessage* to use NotifyUser*;
fixed TGraphicPropertyEditor for when Property is nil. git-svn-id: trunk@1255 -
This commit is contained in:
parent
5612b36d36
commit
6437fd32de
@ -1097,7 +1097,7 @@ type
|
|||||||
procedure LayoutDialog;
|
procedure LayoutDialog;
|
||||||
procedure Paint; override;
|
procedure Paint; override;
|
||||||
constructor CreateMessageDialog(const ACaption, aMsg: string;
|
constructor CreateMessageDialog(const ACaption, aMsg: string;
|
||||||
DialogType : longint; TheButtons: Array of Longint; DefaultIndex : Longint);
|
DialogType : longint; TheButtons: PLongint; ButtonCount, DefaultIndex : Longint);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMessageBox.MessageBoxKeyDown(Sender: TObject; var Key: Word;
|
procedure TMessageBox.MessageBoxKeyDown(Sender: TObject; var Key: Word;
|
||||||
@ -1138,7 +1138,7 @@ const
|
|||||||
|
|
||||||
|
|
||||||
constructor TMessageBox.CreateMessageDialog(const ACaption, aMsg: string;
|
constructor TMessageBox.CreateMessageDialog(const ACaption, aMsg: string;
|
||||||
DialogType : longint; TheButtons: Array of Longint; DefaultIndex : Longint);
|
DialogType : longint; TheButtons: PLongint; ButtonCount, DefaultIndex : Longint);
|
||||||
begin
|
begin
|
||||||
inherited Create (Application);
|
inherited Create (Application);
|
||||||
|
|
||||||
@ -1181,15 +1181,16 @@ begin
|
|||||||
Caption := rsmtInformation;//Should be Application.Title, when we have one
|
Caption := rsmtInformation;//Should be Application.Title, when we have one
|
||||||
end
|
end
|
||||||
end;
|
end;
|
||||||
NumButtons := High(TheButtons) - Low(TheButtons) + 1;
|
NumButtons := ButtonCount;
|
||||||
Buttons := @TheButtons[Low(TheButtons)];
|
Buttons := TheButtons;
|
||||||
|
|
||||||
theDefaultIndex := DefaultIndex - Low(TheButtons);
|
If (DefaultIndex >= ButtonCount) or
|
||||||
If (TheDefaultIndex >= High(TheButtons) - Low(TheButtons)) or
|
(DefaultIndex < 0)
|
||||||
(TheDefaultIndex < 0)
|
|
||||||
then
|
then
|
||||||
TheDefaultIndex := 0;
|
TheDefaultIndex := 0
|
||||||
|
else
|
||||||
|
theDefaultIndex := DefaultIndex;
|
||||||
|
|
||||||
LayoutDialog;
|
LayoutDialog;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1312,11 +1313,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
Function TInterfaceBase.PromptUser(const DialogCaption, DialogMessage : String; DialogType : longint;
|
Function TInterfaceBase.PromptUser(const DialogCaption, DialogMessage : String; DialogType : longint;
|
||||||
Buttons : Array of Longint; DefaultIndex, EscapeResult : Longint) : Longint;
|
Buttons : PLongint; ButtonCount, DefaultIndex, EscapeResult : Longint) : Longint;
|
||||||
var
|
var
|
||||||
theModalResult : longint;
|
theModalResult : longint;
|
||||||
begin
|
begin
|
||||||
with TMessageBox.CreateMessageDialog (DialogCaption, DialogMessage, DialogType, Buttons, DefaultIndex) do
|
with TMessageBox.CreateMessageDialog (DialogCaption, DialogMessage, DialogType, Buttons, ButtonCount, DefaultIndex) do
|
||||||
try
|
try
|
||||||
theModalResult := ShowModal;
|
theModalResult := ShowModal;
|
||||||
Case theModalResult of
|
Case theModalResult of
|
||||||
@ -1330,12 +1331,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
Function TInterfaceBase.PromptUserAtXY(const DialogCaption, DialogMessage : String;
|
Function TInterfaceBase.PromptUserAtXY(const DialogCaption, DialogMessage : String;
|
||||||
DialogType : longint; Buttons : Array of Longint; DefaultIndex, EscapeResult : Longint;
|
DialogType : longint; Buttons : PLongint; ButtonCount, DefaultIndex, EscapeResult : Longint;
|
||||||
X, Y : Longint) : Longint;
|
X, Y : Longint) : Longint;
|
||||||
var
|
var
|
||||||
theModalResult : longint;
|
theModalResult : longint;
|
||||||
begin
|
begin
|
||||||
with TMessageBox.CreateMessageDialog (DialogCaption, DialogMessage, DialogType,Buttons, DefaultIndex)
|
with TMessageBox.CreateMessageDialog (DialogCaption, DialogMessage, DialogType, Buttons, ButtonCount, DefaultIndex)
|
||||||
do
|
do
|
||||||
try
|
try
|
||||||
Position := poDesigned;
|
Position := poDesigned;
|
||||||
@ -1770,6 +1771,10 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.58 2002/10/23 14:36:52 lazarus
|
||||||
|
AJ:Fixes to PromptUser;Switched ShowMessage* to use NotifyUser*;
|
||||||
|
fixed TGraphicPropertyEditor for when Property is nil.
|
||||||
|
|
||||||
Revision 1.57 2002/10/16 16:58:22 lazarus
|
Revision 1.57 2002/10/16 16:58:22 lazarus
|
||||||
MG: moved SendCachedLCLMessages
|
MG: moved SendCachedLCLMessages
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user