mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 21:59:16 +02:00
MG: fixed initial size of TPage
git-svn-id: trunk@1578 -
This commit is contained in:
parent
e9e6e8d350
commit
47e3ef52e6
@ -258,14 +258,17 @@ const
|
|||||||
function StrToVKCode(s: string): integer;
|
function StrToVKCode(s: string): integer;
|
||||||
var i: integer;
|
var i: integer;
|
||||||
begin
|
begin
|
||||||
|
Result:=VK_UNKNOWN;
|
||||||
if copy(s,1,6)='Word(''' then
|
if copy(s,1,6)='Word(''' then
|
||||||
Result:=StrToIntDef(copy(s,7,length(s)-8),VK_UNKNOWN)
|
Result:=StrToIntDef(copy(s,7,length(s)-8),VK_UNKNOWN)
|
||||||
else if s<>'none' then begin
|
else if s<>'none' then begin
|
||||||
for i:=1 to 200 do
|
for i:=1 to 300 do
|
||||||
if KeyAndShiftStateToStr(i,[])=s then
|
if KeyAndShiftStateToStr(i,[])=s then
|
||||||
Result:=i;
|
Result:=i;
|
||||||
end else
|
for i:=VK_IRREGULAR+33 to VK_IRREGULAR+255 do
|
||||||
Result:=VK_UNKNOWN;
|
if KeyAndShiftStateToStr(i,[])=s then
|
||||||
|
Result:=i;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ShowKeyMappingEditForm(Index:integer;
|
function ShowKeyMappingEditForm(Index:integer;
|
||||||
@ -622,6 +625,9 @@ begin
|
|||||||
VK_POINT :Result:=Result+'.';
|
VK_POINT :Result:=Result+'.';
|
||||||
VK_SLASH :Result:=Result+'/';
|
VK_SLASH :Result:=Result+'/';
|
||||||
VK_AT :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
|
else
|
||||||
Result:=Result+'Word('''+IntToStr(Key)+''')';
|
Result:=Result+'Word('''+IntToStr(Key)+''')';
|
||||||
end;
|
end;
|
||||||
|
@ -5368,7 +5368,7 @@ begin
|
|||||||
end else begin
|
end else begin
|
||||||
NewSrcEdit:=ActiveSrcEdit;
|
NewSrcEdit:=ActiveSrcEdit;
|
||||||
end;
|
end;
|
||||||
//writeln('[TMainIDE.DoJumpToCodePos] ',NewX,',',NewY,',',NewTopLine);
|
//writeln('[TMainIDE.DoJumpToCodePos] ',NewX,',',NewY,',',NewTopLine);
|
||||||
with NewSrcEdit.EditorComponent do begin
|
with NewSrcEdit.EditorComponent do begin
|
||||||
CaretXY:=Point(NewX,NewY);
|
CaretXY:=Point(NewX,NewY);
|
||||||
BlockBegin:=CaretXY;
|
BlockBegin:=CaretXY;
|
||||||
@ -6193,6 +6193,9 @@ end.
|
|||||||
|
|
||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
$Log$
|
$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
|
Revision 1.266 2002/03/29 23:22:20 lazarus
|
||||||
MG: started internationalization of IDE
|
MG: started internationalization of IDE
|
||||||
|
|
||||||
|
@ -89,10 +89,10 @@ var
|
|||||||
NewPageIndex: integer;
|
NewPageIndex: integer;
|
||||||
begin
|
begin
|
||||||
// Make sure Index is in the range of valid pages to delete
|
// Make sure Index is in the range of valid pages to delete
|
||||||
{$IFDEF NOTEBOOK_DEBUG}
|
{$IFDEF NOTEBOOK_DEBUG}
|
||||||
//writeln('TNBPages.Delete A Index=',Index);
|
//writeln('TNBPages.Delete A Index=',Index);
|
||||||
writeln('TNBPages.Delete B Index=',Index,' fPageList.Count=',fPageList.Count,' fNoteBook.PageIndex=',fNoteBook.PageIndex);
|
writeln('TNBPages.Delete B Index=',Index,' fPageList.Count=',fPageList.Count,' fNoteBook.PageIndex=',fNoteBook.PageIndex);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
if (Index >= 0) and
|
if (Index >= 0) and
|
||||||
(Index < fPageList.Count) then
|
(Index < fPageList.Count) then
|
||||||
begin
|
begin
|
||||||
@ -122,9 +122,9 @@ writeln('TNBPages.Delete B Index=',Index,' fPageList.Count=',fPageList.Count,' f
|
|||||||
if NewPageIndex>=Index then
|
if NewPageIndex>=Index then
|
||||||
fNoteBook.PageIndex:=NewPageIndex-1;
|
fNoteBook.PageIndex:=NewPageIndex-1;
|
||||||
end;
|
end;
|
||||||
{$IFDEF NOTEBOOK_DEBUG}
|
{$IFDEF NOTEBOOK_DEBUG}
|
||||||
writeln('TNBPages.Delete END Index=',Index,' fPageList.Count=',fPageList.Count,' fNoteBook.PageIndex=',fNoteBook.PageIndex);
|
writeln('TNBPages.Delete END Index=',Index,' fPageList.Count=',fPageList.Count,' fNoteBook.PageIndex=',fNoteBook.PageIndex);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -163,13 +163,7 @@ begin
|
|||||||
Msg.fCompStyle := fNotebook.fCompStyle;
|
Msg.fCompStyle := fNotebook.fCompStyle;
|
||||||
Msg.Page := Index;
|
Msg.Page := Index;
|
||||||
|
|
||||||
{$IFDEF NOTEBOOK_DEBUG}
|
|
||||||
writeln('[TNBPages.InsertPage] A ',Index);
|
|
||||||
{$ENDIF}
|
|
||||||
CNSendMessage(LM_ADDPAGE, fNotebook, @Msg);
|
CNSendMessage(LM_ADDPAGE, fNotebook, @Msg);
|
||||||
{$IFDEF NOTEBOOK_DEBUG}
|
|
||||||
writeln('[TNBPages.InsertPage] B ');
|
|
||||||
{$ENDIF}
|
|
||||||
|
|
||||||
fNoteBook.PageIndex := Index;
|
fNoteBook.PageIndex := Index;
|
||||||
end;
|
end;
|
||||||
@ -230,13 +224,7 @@ var
|
|||||||
n: Integer;
|
n: Integer;
|
||||||
Msg: TLMNotebookEvent;
|
Msg: TLMNotebookEvent;
|
||||||
begin
|
begin
|
||||||
{$IFDEF NOTEBOOK_DEBUG}
|
|
||||||
writeln('[TCustomNotebook.CreateWnd] A');
|
|
||||||
{$ENDIF}
|
|
||||||
inherited CreateWnd;
|
inherited CreateWnd;
|
||||||
{$IFDEF NOTEBOOK_DEBUG}
|
|
||||||
writeln('[TCustomNotebook.CreateWnd] B');
|
|
||||||
{$ENDIF}
|
|
||||||
|
|
||||||
Assert(False, 'Trace:[TCustomNotebook.CreateWnd] add pages');
|
Assert(False, 'Trace:[TCustomNotebook.CreateWnd] add pages');
|
||||||
for n := 0 to FPageList.Count -1 do begin
|
for n := 0 to FPageList.Count -1 do begin
|
||||||
@ -247,22 +235,12 @@ writeln('[TCustomNotebook.CreateWnd] B');
|
|||||||
Msg.Child := TControl(FPageList[n]);
|
Msg.Child := TControl(FPageList[n]);
|
||||||
Msg.fCompStyle := FCompStyle;
|
Msg.fCompStyle := FCompStyle;
|
||||||
Msg.Page := n;
|
Msg.Page := n;
|
||||||
{$IFDEF NOTEBOOK_DEBUG}
|
|
||||||
writeln('[TCustomNotebook.CreateWnd] C ',n);
|
|
||||||
{$ENDIF}
|
|
||||||
CNSendMessage(LM_ADDPAGE, Self, @Msg);
|
CNSendMessage(LM_ADDPAGE, Self, @Msg);
|
||||||
{$IFDEF NOTEBOOK_DEBUG}
|
|
||||||
writeln('[TCustomNotebook.CreateWnd] D');
|
|
||||||
{$ENDIF}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
SetShowTabs(FShowTabs);
|
SetShowTabs(FShowTabs);
|
||||||
SetTabPosition(fTabPosition);
|
SetTabPosition(fTabPosition);
|
||||||
SetPageIndex(FPageIndex);
|
SetPageIndex(FPageIndex);
|
||||||
|
|
||||||
{$IFDEF NOTEBOOK_DEBUG}
|
|
||||||
writeln('[TCustomNotebook.CreateWnd] END');
|
|
||||||
{$ENDIF}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
@ -409,13 +387,7 @@ begin
|
|||||||
Msg.fCompStyle := fCompStyle;
|
Msg.fCompStyle := fCompStyle;
|
||||||
Msg.TabPosition := @fTabPosition;
|
Msg.TabPosition := @fTabPosition;
|
||||||
//InterfaceObject.IntCNSendMessage2(LM_SETTABPOSITION, Self, nil, @fTabPosition);
|
//InterfaceObject.IntCNSendMessage2(LM_SETTABPOSITION, Self, nil, @fTabPosition);
|
||||||
{$IFDEF NOTEBOOK_DEBUG}
|
|
||||||
writeln('[TCustomNotebook.SetTabPosition] A');
|
|
||||||
{$ENDIF}
|
|
||||||
CNSendMessage(LM_SETTABPOSITION, Self, @Msg);
|
CNSendMessage(LM_SETTABPOSITION, Self, @Msg);
|
||||||
{$IFDEF NOTEBOOK_DEBUG}
|
|
||||||
writeln('[TCustomNotebook.SetTabPosition] B');
|
|
||||||
{$ENDIF}
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -534,6 +506,9 @@ end;}
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$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
|
Revision 1.14 2002/03/25 17:59:20 lazarus
|
||||||
GTK Cleanup
|
GTK Cleanup
|
||||||
Shane
|
Shane
|
||||||
|
@ -16,8 +16,14 @@ constructor TPage.Create(AOwner: TComponent);
|
|||||||
begin
|
begin
|
||||||
inherited Create(AOwner);
|
inherited Create(AOwner);
|
||||||
{set the default height and width}
|
{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;
|
Width:=120;
|
||||||
Height:=100;
|
Height:=100;
|
||||||
|
end;
|
||||||
|
|
||||||
{create the control}
|
{create the control}
|
||||||
fCompStyle := csPage;
|
fCompStyle := csPage;
|
||||||
@ -84,6 +90,9 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
Revision 1.6 2002/03/25 17:59:20 lazarus
|
||||||
GTK Cleanup
|
GTK Cleanup
|
||||||
Shane
|
Shane
|
||||||
|
@ -1401,6 +1401,9 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
Revision 1.3 2002/03/31 22:01:37 lazarus
|
||||||
MG: fixed unreleased/unpressed Ctrl/Alt/Shift
|
MG: fixed unreleased/unpressed Ctrl/Alt/Shift
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user