MG: JITForms now sets csDesigning before creation

git-svn-id: trunk@900 -
This commit is contained in:
lazarus 2002-02-09 01:47:18 +00:00
parent c402ffdf5a
commit 81c4bdafa2

View File

@ -3583,24 +3583,6 @@ end;
Tells GTK Engine to create a widget
------------------------------------------------------------------------------}
procedure TgtkObject.CreateComponent(Sender : TObject);
const
FormStyleMap : array[TFormBorderStyle] of integer = (
GTK_WINDOW_DIALOG, // bsNone
GTK_WINDOW_TOPLEVEL,// bsSingle
GTK_WINDOW_TOPLEVEL,// bsSizeable
GTK_WINDOW_DIALOG, // bsDialog
GTK_WINDOW_DIALOG, // bsToolWindow
GTK_WINDOW_DIALOG // bsSizeToolWin
);
FormResizableMap : array[TFormBorderStyle] of gint = (
0, // bsNone
1, // bsSingle
1, // bsSizeable
0, // bsDialog
0, // bsToolWindow
1 // bsSizeToolWin
);
//unused: FormBorderWidth : array[TFormBorderStyle] of gint = (0, 1, 2, 1, 1, 2);
//unused:type
//unused: Tpixdata = Array[1..20] of String;
@ -3627,6 +3609,7 @@ var
Accel : PChar;
SetupProps : boolean;
Titles: PPGChar;
ABorderStyle: TFormBorderStyle;
procedure Set_RC_Name(AWidget: PGtkWidget);
var RCName: string;
@ -3826,10 +3809,16 @@ begin
csForm :
begin
Assert(Sender is TForm);
p := gtk_window_new(FormStyleMap[TForm(Sender).BorderStyle]);
gtk_window_set_policy (GTK_WINDOW (p), FormResizableMap[TForm(Sender).BorderStyle],
FormResizableMap[TForm(Sender).BorderStyle], 0);
if csDesigning in TForm(Sender).ComponentState then
ABorderStyle:=bsSizeable
else
ABorderStyle:=TForm(Sender).BorderStyle;
p := gtk_window_new(FormStyleMap[ABorderStyle]);
gtk_window_set_policy (GTK_WINDOW (p), FormResizableMap[ABorderStyle],
FormResizableMap[ABorderStyle], 0);
gtk_window_set_title(pGtkWindow(p), strTemp);
// the clipboard needs a widget
@ -5908,6 +5897,9 @@ end;
{ =============================================================================
$Log$
Revision 1.233 2002/10/06 17:55:45 lazarus
MG: JITForms now sets csDesigning before creation
Revision 1.232 2002/10/05 10:37:21 lazarus
MG: fixed TComboBox.ItemIndex on CreateWnd