mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 11:19:26 +02:00
gtk2 interface: temporarily disabled Memo.SelStart and SelLength if the memo strings are not yet created, even if an handle exists.
git-svn-id: trunk@21115 -
This commit is contained in:
parent
60e6d7e7ad
commit
2a16a46258
@ -206,6 +206,10 @@ begin
|
||||
if not WSCheckHandleAllocated(ACustomEdit, 'SetSelStart') then
|
||||
Exit;
|
||||
|
||||
// temporary fix, exit is Lines is not a TGTk2MemoStrings
|
||||
if not (TCustomMemo(ACustomEdit).Lines is TGtk2MemoStrings) then
|
||||
exit;
|
||||
|
||||
MemoStrings := TCustomMemo(ACustomEdit).Lines as TGtk2MemoStrings;
|
||||
MemoStrings.QueueCursorMove(NewStart);
|
||||
end;
|
||||
@ -218,6 +222,10 @@ begin
|
||||
if not WSCheckHandleAllocated(ACustomEdit, 'SetSelLength') then
|
||||
Exit;
|
||||
|
||||
// temporary fix, exit is Lines is not a TGTk2MemoStrings
|
||||
if not (TCustomMemo(ACustomEdit).Lines is TGtk2MemoStrings) then
|
||||
exit;
|
||||
|
||||
MemoStrings := TCustomMemo(ACustomEdit).Lines as TGtk2MemoStrings;
|
||||
MemoStrings.QueueSelectLength(NewLength);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user