mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-09 02:39:32 +01:00
Intermediate UI patch to show a bug.
git-svn-id: trunk@3279 -
This commit is contained in:
parent
da2e467433
commit
939e1f6074
@ -70,9 +70,10 @@ end;
|
|||||||
procedure TMainForm.Button1Click(Sender : TObject);
|
procedure TMainForm.Button1Click(Sender : TObject);
|
||||||
begin
|
begin
|
||||||
ShowMessage ('First simple test!');
|
ShowMessage ('First simple test!');
|
||||||
|
writeln('Go to second dialog');
|
||||||
MessageDlg ('Caption', 'Two buttons now...', mtError, [mbOK,mbCancel], 0);
|
MessageDlg ('Caption', 'Two buttons now...', mtError, [mbOK,mbCancel], 0);
|
||||||
MessageDlg ('Warning, not fully implemented', mtWarning, [mbYes, mbNo, mbOK,mbCancel], 0);
|
MessageDlg ('Warning, not fully implemented', mtWarning, [mbYes, mbNo, mbOK,mbCancel], 0);
|
||||||
ShowMessageFmt ('The show will end now'+#13+'%s'+#13+'Good bye!!!', [MainForm.Caption]);
|
ShowMessageFmt ('The show will end now'+LineEnding+'%s'+LineEnding+'Good bye!!!', [MainForm.Caption]);
|
||||||
close;
|
close;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -84,6 +85,9 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.5 2002/09/03 20:02:01 lazarus
|
||||||
|
Intermediate UI patch to show a bug.
|
||||||
|
|
||||||
Revision 1.4 2002/08/30 10:06:07 lazarus
|
Revision 1.4 2002/08/30 10:06:07 lazarus
|
||||||
Fixed alignment of multiline TLabel.
|
Fixed alignment of multiline TLabel.
|
||||||
Simplified and prettified MessageBoxen.
|
Simplified and prettified MessageBoxen.
|
||||||
|
|||||||
@ -194,7 +194,7 @@ ResourceString
|
|||||||
lisSelectDFMFiles = 'Select Delphi form files (*.dfm)';
|
lisSelectDFMFiles = 'Select Delphi form files (*.dfm)';
|
||||||
|
|
||||||
// dialogs
|
// dialogs
|
||||||
lisSaveChangesToProject = 'Save changes to project?';
|
lisSaveChangesToProject = 'Save changes to project %s?';
|
||||||
lisProjectChanged = 'Project changed';
|
lisProjectChanged = 'Project changed';
|
||||||
|
|
||||||
lisFPCSourceDirectoryError = 'FPC Source Directory error';
|
lisFPCSourceDirectoryError = 'FPC Source Directory error';
|
||||||
|
|||||||
@ -983,11 +983,12 @@ begin
|
|||||||
SaveCount := Screen.FCursorCount;
|
SaveCount := Screen.FCursorCount;
|
||||||
WindowList := DisableTaskWindows(0);}
|
WindowList := DisableTaskWindows(0);}
|
||||||
ModalResult := 0;
|
ModalResult := 0;
|
||||||
|
|
||||||
try
|
try
|
||||||
Show;
|
Show;
|
||||||
try
|
try
|
||||||
CNSendMessage(LM_SHOWMODAL, Self, nil);
|
CNSendMessage(LM_SHOWMODAL, Self, nil);
|
||||||
Repeat
|
repeat
|
||||||
{ Delphi calls Application.HandleMessage
|
{ Delphi calls Application.HandleMessage
|
||||||
But HandleMessage processes all pending events and then calls idle,
|
But HandleMessage processes all pending events and then calls idle,
|
||||||
which will wait for new messages. Under Win32 there always a next
|
which will wait for new messages. Under Win32 there always a next
|
||||||
@ -1001,6 +1002,7 @@ begin
|
|||||||
if ModalResult<>0 then break;
|
if ModalResult<>0 then break;
|
||||||
Application.Idle;
|
Application.Idle;
|
||||||
until ModalResult <> 0;
|
until ModalResult <> 0;
|
||||||
|
|
||||||
Result := ModalResult;
|
Result := ModalResult;
|
||||||
//if GetActiveWindow <> Handle then ActiveWindow := 0;
|
//if GetActiveWindow <> Handle then ActiveWindow := 0;
|
||||||
finally
|
finally
|
||||||
@ -1025,7 +1027,11 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.56 2002/09/03 20:02:01 lazarus
|
||||||
|
Intermediate UI patch to show a bug.
|
||||||
|
|
||||||
Revision 1.55 2002/09/03 11:32:49 lazarus
|
Revision 1.55 2002/09/03 11:32:49 lazarus
|
||||||
|
|
||||||
Added shortcut keys to labels
|
Added shortcut keys to labels
|
||||||
Support for alphabetically sorting the properties
|
Support for alphabetically sorting the properties
|
||||||
Standardize message and add shortcuts ala Kylix
|
Standardize message and add shortcuts ala Kylix
|
||||||
|
|||||||
@ -106,7 +106,7 @@ procedure TCustomLabel.SetShowAccelChar(Val : boolean);
|
|||||||
begin
|
begin
|
||||||
if Val <> FShowAccelChar then begin
|
if Val <> FShowAccelChar then begin
|
||||||
FShowAccelChar:= Val;
|
FShowAccelChar:= Val;
|
||||||
CNSendMessage(LM_SETLABEL, Self, PChar(Caption));
|
if HandleAllocated then CNSendMessage(LM_SETLABEL, Self, PChar(Caption));
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -144,7 +144,11 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.6 2002/09/03 20:02:01 lazarus
|
||||||
|
Intermediate UI patch to show a bug.
|
||||||
|
|
||||||
Revision 1.5 2002/09/03 11:32:49 lazarus
|
Revision 1.5 2002/09/03 11:32:49 lazarus
|
||||||
|
|
||||||
Added shortcut keys to labels
|
Added shortcut keys to labels
|
||||||
Support for alphabetically sorting the properties
|
Support for alphabetically sorting the properties
|
||||||
Standardize message and add shortcuts ala Kylix
|
Standardize message and add shortcuts ala Kylix
|
||||||
|
|||||||
@ -94,6 +94,7 @@ begin
|
|||||||
FMsgLines := TStringList.Create;
|
FMsgLines := TStringList.Create;
|
||||||
FLabel := TLabel.Create(Self);
|
FLabel := TLabel.Create(Self);
|
||||||
FLabel.Alignment:= taLeftJustify;
|
FLabel.Alignment:= taLeftJustify;
|
||||||
|
FLabel.ShowAccelChar:= false;
|
||||||
FLabel.Parent:= Self;
|
FLabel.Parent:= Self;
|
||||||
FLabel.Visible:= true;
|
FLabel.Visible:= true;
|
||||||
|
|
||||||
@ -244,8 +245,7 @@ begin
|
|||||||
FDlgType := value;
|
FDlgType := value;
|
||||||
FBitmap.Free;
|
FBitmap.Free;
|
||||||
FBitmap := TBitmap.Create;
|
FBitmap := TBitmap.Create;
|
||||||
FBitmap.Handle := CreatePixmapIndirect(@mtImages[FDlgType],
|
FBitmap.Handle := CreatePixmapIndirect(@mtImages[FDlgType], ColorToRGB(clBtnFace));
|
||||||
ColorToRGB(clBtnFace));
|
|
||||||
if DefaultCaption then
|
if DefaultCaption then
|
||||||
Caption := cMtCaption[FDlgType];
|
Caption := cMtCaption[FDlgType];
|
||||||
end;
|
end;
|
||||||
@ -279,7 +279,6 @@ const
|
|||||||
cBtnDist = cBtnWidth + 4;
|
cBtnDist = cBtnWidth + 4;
|
||||||
cMinLeft = cBitmapX + cBitmapWidth + cLabelSpacing;
|
cMinLeft = cBitmapX + cBitmapWidth + cLabelSpacing;
|
||||||
var
|
var
|
||||||
aButton : TBitBtn; // temp. variable to create buttons
|
|
||||||
aBitmap : TBitmap; // temp. variable to create bitmaps for buttons
|
aBitmap : TBitmap; // temp. variable to create bitmaps for buttons
|
||||||
curBtn : TMsgDlgBtn; // variable to loop through TMsgDlgButtons
|
curBtn : TMsgDlgBtn; // variable to loop through TMsgDlgButtons
|
||||||
ButtonLeft : integer; // left position of button(s)
|
ButtonLeft : integer; // left position of button(s)
|
||||||
@ -335,8 +334,8 @@ begin
|
|||||||
for curBtn := low(TMsgDlgBtn) to high(TMsgDlgBtn) do begin
|
for curBtn := low(TMsgDlgBtn) to high(TMsgDlgBtn) do begin
|
||||||
if curBtn in FButtons then begin
|
if curBtn in FButtons then begin
|
||||||
inc(ButtonIndex);
|
inc(ButtonIndex);
|
||||||
aButton := TBitBtn.Create(self);
|
|
||||||
With aButton do begin
|
with TBitBtn.Create(Self) do begin
|
||||||
Parent:= Self;
|
Parent:= Self;
|
||||||
SetBounds (ButtonLeft, 2 * cLabelSpacing + reqHeight, cBtnWidth, cBtnHeight);
|
SetBounds (ButtonLeft, 2 * cLabelSpacing + reqHeight, cBtnWidth, cBtnHeight);
|
||||||
inc(ButtonLeft, cBtnDist);
|
inc(ButtonLeft, cBtnDist);
|
||||||
@ -374,8 +373,7 @@ procedure TMessageBox.EndUpdate;
|
|||||||
begin
|
begin
|
||||||
dec(FUpdateCounter);
|
dec(FUpdateCounter);
|
||||||
if FUpdateCounter<0 then FUpdateCounter:= 0;
|
if FUpdateCounter<0 then FUpdateCounter:= 0;
|
||||||
if (FUpdateCounter=0) and (FRelayoutNeeded) then
|
if (FUpdateCounter = 0) and FRelayoutNeeded then ReLayout;
|
||||||
ReLayout;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
@ -385,7 +383,7 @@ function CreateMessageDialog(const aMsg: string; DlgType: TMsgDlgType;
|
|||||||
var
|
var
|
||||||
msgbox : TMessageBox;
|
msgbox : TMessageBox;
|
||||||
begin
|
begin
|
||||||
msgbox := TMessageBox.Create (application);
|
msgbox:= TMessageBox.Create(Application);
|
||||||
msgbox.BeginUpdate;
|
msgbox.BeginUpdate;
|
||||||
msgbox.theMessage := aMsg;
|
msgbox.theMessage := aMsg;
|
||||||
msgBox.DialogType := DlgType;
|
msgBox.DialogType := DlgType;
|
||||||
@ -474,6 +472,9 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.13 2002/09/03 20:02:01 lazarus
|
||||||
|
Intermediate UI patch to show a bug.
|
||||||
|
|
||||||
Revision 1.12 2002/08/30 10:06:07 lazarus
|
Revision 1.12 2002/08/30 10:06:07 lazarus
|
||||||
Fixed alignment of multiline TLabel.
|
Fixed alignment of multiline TLabel.
|
||||||
Simplified and prettified MessageBoxen.
|
Simplified and prettified MessageBoxen.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user