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;
@ -623,7 +626,10 @@ begin
VK_SLASH :Result:=Result+'/';
VK_AT :Result:=Result+'@';
else
Result:=Result+'Word('''+IntToStr(Key)+''')';
if (Key>=VK_IRREGULAR+33) and (Key<=VK_IRREGULAR+255) then
Result:=Result+chr(Key-VK_IRREGULAR)
else
Result:=Result+'Word('''+IntToStr(Key)+''')';
end;
end;

View File

@ -5368,7 +5368,7 @@ begin
end else begin
NewSrcEdit:=ActiveSrcEdit;
end;
//writeln('[TMainIDE.DoJumpToCodePos] ',NewX,',',NewY,',',NewTopLine);
//writeln('[TMainIDE.DoJumpToCodePos] ',NewX,',',NewY,',',NewTopLine);
with NewSrcEdit.EditorComponent do begin
CaretXY:=Point(NewX,NewY);
BlockBegin:=CaretXY;
@ -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

@ -89,10 +89,10 @@ var
NewPageIndex: integer;
begin
// Make sure Index is in the range of valid pages to delete
{$IFDEF NOTEBOOK_DEBUG}
//writeln('TNBPages.Delete A Index=',Index);
writeln('TNBPages.Delete B Index=',Index,' fPageList.Count=',fPageList.Count,' fNoteBook.PageIndex=',fNoteBook.PageIndex);
{$ENDIF}
{$IFDEF NOTEBOOK_DEBUG}
//writeln('TNBPages.Delete A Index=',Index);
writeln('TNBPages.Delete B Index=',Index,' fPageList.Count=',fPageList.Count,' fNoteBook.PageIndex=',fNoteBook.PageIndex);
{$ENDIF}
if (Index >= 0) and
(Index < fPageList.Count) then
begin
@ -122,9 +122,9 @@ writeln('TNBPages.Delete B Index=',Index,' fPageList.Count=',fPageList.Count,' f
if NewPageIndex>=Index then
fNoteBook.PageIndex:=NewPageIndex-1;
end;
{$IFDEF NOTEBOOK_DEBUG}
writeln('TNBPages.Delete END Index=',Index,' fPageList.Count=',fPageList.Count,' fNoteBook.PageIndex=',fNoteBook.PageIndex);
{$ENDIF}
{$IFDEF NOTEBOOK_DEBUG}
writeln('TNBPages.Delete END Index=',Index,' fPageList.Count=',fPageList.Count,' fNoteBook.PageIndex=',fNoteBook.PageIndex);
{$ENDIF}
end;
@ -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}
Width:=120;
Height:=100;
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

@ -342,7 +342,7 @@ PM_Remove = 1;
VK_POINT = 190;
VK_SLASH = 191;
VK_AT = 192;
// VK_L & VK_R - left and right Alt, Ctrl and Shift virtual keys.
// Used only as parameters to GetAsyncKeyState() and GetKeyState().
@ -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