SetFocus to TCustomEditButton on PageControl tabsheet has strange effect
Original Reporter info from Mantis: fransfpc
-
Reporter name: Frans van Leeuwen
Original Reporter info from Mantis: fransfpc
- Reporter name: Frans van Leeuwen
Description:
I have a TFileNameEdit field on a TTabsheet that I want to receive focus when the Tabsheet is shown. So I put a Field.SetFocus order in the OnShow method. When I show the tabsheet, de field is shown in the full length, but from the text in the field only the last characters are shown, as if field.width=80.
Steps to reproduce:
Start the attached program, comment the lines 'TabSheet2.SetFocus;' and 'if TabSheet2.Focused then', compile and run.
Additional information:
When I change tab and change again, the field and the text are shown as should be.
Other fields, the TEdit and the TMaskEdit field don't have this problem.
I put in two lines in trying to find a workaround. And I've found it. But I can't imagine this is the way it should be.
Mantis conversion info:
- Mantis ID: 30686
- Version: 1.6
- Monitored by: » @flyingsheep (Bart Broersma)