MG: fixed initial size of TPage

git-svn-id: trunk@1578 -
This commit is contained in:
lazarus 2002-03-31 23:20:38 +00:00
parent e9e6e8d350
commit 47e3ef52e6
5 changed files with 39 additions and 43 deletions

View File

@ -258,14 +258,17 @@ const
function StrToVKCode(s: string): integer;
var i: integer;
begin
Result:=VK_UNKNOWN;
if copy(s,1,6)='Word(''' then
Result:=StrToIntDef(copy(s,7,length(s)-8),VK_UNKNOWN)
else if s<>'none' then begin
for i:=1 to 200 do
for i:=1 to 300 do
if KeyAndShiftStateToStr(i,[])=s then
Result:=i;
end else
Result:=VK_UNKNOWN;
for i:=VK_IRREGULAR+33 to VK_IRREGULAR+255 do
if KeyAndShiftStateToStr(i,[])=s then
Result:=i;
end;
end;
function ShowKeyMappingEditForm(Index:integer;
@ -622,6 +625,9 @@ begin
VK_POINT :Result:=Result+'.';
VK_SLASH :Result:=Result+'/';
VK_AT :Result:=Result+'@';
else
if (Key>=VK_IRREGULAR+33) and (Key<=VK_IRREGULAR+255) then
Result:=Result+chr(Key-VK_IRREGULAR)
else
Result:=Result+'Word('''+IntToStr(Key)+''')';
end;

View File

@ -6193,6 +6193,9 @@ end.
{ =============================================================================
$Log$
Revision 1.267 2002/03/31 23:20:35 lazarus
MG: fixed initial size of TPage
Revision 1.266 2002/03/29 23:22:20 lazarus
MG: started internationalization of IDE

View File

@ -163,13 +163,7 @@ begin
Msg.fCompStyle := fNotebook.fCompStyle;
Msg.Page := Index;
{$IFDEF NOTEBOOK_DEBUG}
writeln('[TNBPages.InsertPage] A ',Index);
{$ENDIF}
CNSendMessage(LM_ADDPAGE, fNotebook, @Msg);
{$IFDEF NOTEBOOK_DEBUG}
writeln('[TNBPages.InsertPage] B ');
{$ENDIF}
fNoteBook.PageIndex := Index;
end;
@ -230,13 +224,7 @@ var
n: Integer;
Msg: TLMNotebookEvent;
begin
{$IFDEF NOTEBOOK_DEBUG}
writeln('[TCustomNotebook.CreateWnd] A');
{$ENDIF}
inherited CreateWnd;
{$IFDEF NOTEBOOK_DEBUG}
writeln('[TCustomNotebook.CreateWnd] B');
{$ENDIF}
Assert(False, 'Trace:[TCustomNotebook.CreateWnd] add pages');
for n := 0 to FPageList.Count -1 do begin
@ -247,22 +235,12 @@ writeln('[TCustomNotebook.CreateWnd] B');
Msg.Child := TControl(FPageList[n]);
Msg.fCompStyle := FCompStyle;
Msg.Page := n;
{$IFDEF NOTEBOOK_DEBUG}
writeln('[TCustomNotebook.CreateWnd] C ',n);
{$ENDIF}
CNSendMessage(LM_ADDPAGE, Self, @Msg);
{$IFDEF NOTEBOOK_DEBUG}
writeln('[TCustomNotebook.CreateWnd] D');
{$ENDIF}
end;
SetShowTabs(FShowTabs);
SetTabPosition(fTabPosition);
SetPageIndex(FPageIndex);
{$IFDEF NOTEBOOK_DEBUG}
writeln('[TCustomNotebook.CreateWnd] END');
{$ENDIF}
end;
{------------------------------------------------------------------------------
@ -409,13 +387,7 @@ begin
Msg.fCompStyle := fCompStyle;
Msg.TabPosition := @fTabPosition;
//InterfaceObject.IntCNSendMessage2(LM_SETTABPOSITION, Self, nil, @fTabPosition);
{$IFDEF NOTEBOOK_DEBUG}
writeln('[TCustomNotebook.SetTabPosition] A');
{$ENDIF}
CNSendMessage(LM_SETTABPOSITION, Self, @Msg);
{$IFDEF NOTEBOOK_DEBUG}
writeln('[TCustomNotebook.SetTabPosition] B');
{$ENDIF}
end;
end;
@ -534,6 +506,9 @@ end;}
{ =============================================================================
$Log$
Revision 1.15 2002/03/31 23:20:38 lazarus
MG: fixed initial size of TPage
Revision 1.14 2002/03/25 17:59:20 lazarus
GTK Cleanup
Shane

View File

@ -16,8 +16,14 @@ constructor TPage.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
{set the default height and width}
if (AOwner<>nil) and (AOwner is TControl) then begin
Width:=(TControl(AOwner).ClientWidth);
Height:=(TControl(AOwner).ClientHeight);
end else begin
Width:=120;
Height:=100;
end;
{create the control}
fCompStyle := csPage;
@ -84,6 +90,9 @@ end;
{
$Log$
Revision 1.7 2002/03/31 23:20:38 lazarus
MG: fixed initial size of TPage
Revision 1.6 2002/03/25 17:59:20 lazarus
GTK Cleanup
Shane

View File

@ -1401,6 +1401,9 @@ end.
{
$Log$
Revision 1.4 2002/03/31 23:20:38 lazarus
MG: fixed initial size of TPage
Revision 1.3 2002/03/31 22:01:37 lazarus
MG: fixed unreleased/unpressed Ctrl/Alt/Shift