summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-10-10 10:54:38 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-10-10 10:54:38 +0000
commit594a6a445ca92fb76f8f971d707f6c4b9901692a (patch)
treed07ed4afffd87cb94d1b265dbbe1956dbb7e7f86 /examples
parent9b9092ae02ce595d1895506206d4321bc7e57af4 (diff)
downloadfpGUI-594a6a445ca92fb76f8f971d707f6c4b9901692a.tar.xz
* Resizing widgets now take into account the MinWidth and MinHeight
properties. In affect you now cannot resize components into the negative with the UI Designer. * UI Designer: On deleting a component from a form, resets the Object Inspector. * Fixed 'division by zero' errors for the ListView and Memo components when they get resized to smaller that 2x2 pixels in size.
Diffstat (limited to 'examples')
-rw-r--r--examples/apps/uidesigner/vfddesigner.pas3
-rw-r--r--examples/apps/uidesigner/vfdwidgetclass.pas8
2 files changed, 9 insertions, 2 deletions
diff --git a/examples/apps/uidesigner/vfddesigner.pas b/examples/apps/uidesigner/vfddesigner.pas
index 30fce227..e070e0a5 100644
--- a/examples/apps/uidesigner/vfddesigner.pas
+++ b/examples/apps/uidesigner/vfddesigner.pas
@@ -103,6 +103,7 @@ type
procedure MsgMove(var msg: TfpgMessageRec); message FPGM_MOVE;
procedure MsgResize(var msg: TfpgMessageRec); message FPGM_RESIZE;
procedure MsgActivate(var msg: TfpgMessageRec); message FPGM_ACTIVATE;
+ procedure DesignerKeyPress(var keycode: word; var shiftstate: TShiftState; var consumed: boolean);
public
OneClickMove: boolean; // the widgets can be selected and dragged within one click
constructor Create;
@@ -119,7 +120,6 @@ type
procedure MoveResizeWidgets(dx, dy, dw, dh: integer);
procedure DeleteWidgets;
procedure EditWidgetOrder;
- procedure DesignerKeyPress(var keycode: word; var shiftstate: TShiftState; var consumed: boolean);
// procedure PutControlByName(x, y: integer; cname: string);
procedure InsertWidget(pwg: TfpgWidget; x, y: integer; wgc: TVFDWidgetClass);
procedure OnPaletteChange(Sender: TObject);
@@ -606,6 +606,7 @@ begin
else
Inc(n);
end;
+ UpdatePropWin;
end;
diff --git a/examples/apps/uidesigner/vfdwidgetclass.pas b/examples/apps/uidesigner/vfdwidgetclass.pas
index e6f0add2..b1c7eee0 100644
--- a/examples/apps/uidesigner/vfdwidgetclass.pas
+++ b/examples/apps/uidesigner/vfdwidgetclass.pas
@@ -167,7 +167,13 @@ begin
y := rect.top;
fy := y + rect.Height div 2 - Canvas.Font.Height div 2;
- s := GetValueText(wg);
+ try
+ s := GetValueText(wg);
+ except
+ on E: Exception do
+ writeln('Detected a error: ', E.Message);
+ end;
+
Canvas.BeginDraw;
Canvas.DrawString(x + 1, fy, s);
Canvas.EndDraw;