TMemo disappers after executing .BorderStyle:=bsNone; in .FormResize routine
Original Reporter info from Mantis: CM630
-
Reporter name: СМ630
Original Reporter info from Mantis: CM630
- Reporter name: СМ630
Description:
TMemo disappers after executing .BorderStyle:=bsNone; in .OnResize routine
Steps to reproduce:
Create a TMemo named Memo1 and add the code below in .FormResize.
Execute the application and double click on the titlebar to maximize the form. The memo will disappear.
The memo might disappear or reappear, when the form is resized (by dragging its borders).
After uncommenting „{if (Memo1.BorderStyle<> bsNone) then}‟ behaviour is okay.
procedure TForm1.FormResize(Sender: TObject);
var
NewWidth, NewHeight: integer;
begin
NewWidth:= self.Width-10;
NewHeight:=self.Height-30;
Memo1.Left:=2;
Memo1.Top:=26;
Memo1.Width:=NewWidth;
Memo1.Height:=NewHeight;
{if (Memo1.BorderStyle<> bsNone) then} Memo1.BorderStyle:=bsNone;
end;
Mantis conversion info:
- Mantis ID: 31586
- OS Build: 7
- Build: 54278
- Platform: Windows
- Fixed in version: 1.7 (SVN)
- Fixed in revision: r54509 (#48d7ba4e)
- Target version: 1.8