mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 05:29:29 +02:00
gtk2: don't select text in TEdit on focus if AutoSelect = False (issue #0013856)
git-svn-id: trunk@20287 -
This commit is contained in:
parent
8a9fdf48eb
commit
6cb0aa7f54
@ -860,8 +860,13 @@ class function TGtk2WSCustomEdit.CreateHandle(const AWinControl: TWinControl;
|
||||
begin
|
||||
Result := TGtkWSCustomEdit{(ClassParent)}.CreateHandle(AWinControl, AParams);
|
||||
if Result <> 0 then
|
||||
begin
|
||||
gtk_entry_set_has_frame(PGtkEntry(Result),
|
||||
TCustomEdit(AWinControl).BorderStyle <> bsNone);
|
||||
// don't select it on focus since LCL do this itself
|
||||
g_object_set(gtk_widget_get_settings(PGtkWidget(Result)),
|
||||
'gtk-entry-select-on-focus', [0, nil]);
|
||||
end;
|
||||
end;
|
||||
|
||||
class function TGtk2WSCustomEdit.GetSelStart(const ACustomEdit: TCustomEdit
|
||||
|
Loading…
Reference in New Issue
Block a user