mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 23:20:28 +02:00
*Better check who want's to set maxlegth of TCustomEdit - fixed SpinBox av's.
git-svn-id: trunk@11615 -
This commit is contained in:
parent
1da98e8bd4
commit
3868015926
@ -689,7 +689,6 @@ end;
|
||||
class procedure TQtWSCustomMemo.SetMaxLength(const ACustomEdit: TCustomEdit; NewLength: integer);
|
||||
begin
|
||||
{qt QTextEdit doesn't have such property !}
|
||||
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -803,6 +802,7 @@ class procedure TQtWSCustomEdit.SetMaxLength(const ACustomEdit: TCustomEdit; New
|
||||
var
|
||||
MaxLength: Integer;
|
||||
begin
|
||||
if not (TQtWidget(ACustomEdit.Handle) is TQtLineEdit) then exit;
|
||||
{qt doesn't accept -1 !}
|
||||
MaxLength := QLineEdit_maxLength(QLineEditH(TQtLineEdit(ACustomEdit.Handle).Widget));
|
||||
if (NewLength <= 0) or (NewLength > QtMaxEditLength) then
|
||||
|
Loading…
Reference in New Issue
Block a user