TMemo in free vision gives black area when using scrollbars
Original Reporter info from Mantis: rolandvh
-
Reporter name: rolandvh
Original Reporter info from Mantis: rolandvh
- Reporter name: rolandvh
Description:
When I type in the memo field and I get past the width of the field you see a black box and letters are repeated. See attachment.
Steps to reproduce:
program errormemo;
uses App, Menus, dialogs, drivers, views, objects, editors;
type
TMyApp = OBJECT(TApplication)
constructor init;
procedure HandleEvent(var aEvent : TEvent); virtual;
procedure MakeMemoDialog;
procedure InitMenuBar; virtual;
end;
var
MyApp: TMyApp;
const cmMemoDialog = 1000;
constructor TMyApp.init;
begin
inherited init;
end;
procedure TMyApp.InitMenuBar;
var R : TRect;
begin
GetExtent(R);
R.B.Y := R.A.Y + 1;
MenuBar := New(PMenubar, Init(R, NewMenu(NewSubMenu('~M~emo test', hcNoContext,
NewMenu(
NewItem('Test', 'F2', kbF2, cmMemoDialog, hcNoContext, nil)),nil))));
end;
procedure TMyApp.HandleEvent(var aEvent : TEvent);
begin
inherited HandleEvent(aEvent);
if aEvent.What = evCommand then begin
case aEvent.Command of
cmMemoDialog:
begin
MakeMemoDialog;
end
else
begin
Exit;
end;
end;
end;
ClearEvent(aEvent);
end;
procedure TMyApp.MakeMemoDialog;
var
D: PDialog;
R: TRect;
rs: word;
aVScrollBar : PScrollBar;
aHScrollBar : PScrollBar;
aIndicator : PIndicator;
aMemo : PMemo;
begin
GetExtent(R);
R.A.X := R.A.X + 4;
R.A.Y := R.A.Y + 1;
R.B.X := R.B.X - 4;
R.B.Y := R.B.Y - 4;
D := New(PDialog, Init(R, 'Test memo'));
R.A.X := 3;
R.A.Y := 10;
R.B.X := 60;
R.B.Y := 11;
aHScrollBar := New(PScrollbar, Init(R));
D^.Insert(aHScrollBar);
R.A.X := 60;
R.A.Y := 3;
R.B.X := 61;
R.B.Y := 10;
aVScrollBar := New(PScrollBar, Init(R));
D^.Insert(aVScrollBar);
R.A.X := 61;
R.A.Y := 7;
R.B.X := 64;
R.B.Y := 8;
aIndicator := New(PIndicator, Init(R));
D^.Insert(aIndicator);
R.A.X := 3;
R.A.Y := 3;
R.B.X := 60;
R.B.Y := 10;
aMemo := New(PMemo, Init(R, aHScrollBar, aVScrollBar, aIndicator, 10000));
aMemo^.Limit.X := 70;
aMemo^.Limit.Y := 40;
D^.Insert(aMemo);
rs := Desktop^.ExecView(D);
Dispose(D, Done);
end;
begin
MyApp.Init;
MyApp.Run;
MyApp.Done;
end.
Mantis conversion info:
- Mantis ID: 37215
- Version: 3.0.4
- Monitored by: » rolandvh (rolandvh)