mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 00:11:51 +02:00
gtk2: implement BorderStyle setting for GtkEntry (TEdit)
git-svn-id: trunk@19038 -
This commit is contained in:
parent
6efd1ca34f
commit
8ed5064c16
@ -318,6 +318,9 @@ begin
|
||||
Widget := PGtkWidget(AWinControl.Handle);
|
||||
if GTK_IS_SCROLLED_WINDOW(Widget) then
|
||||
gtk_scrolled_window_set_shadow_type(PGtkScrolledWindow(Widget), BorderStyleShadowMap[ABorderStyle])
|
||||
else
|
||||
if GTK_IS_ENTRY(Widget) then
|
||||
gtk_entry_set_has_frame(PGtkEntry(Widget), ABorderStyle <> bsNone)
|
||||
else
|
||||
TGtkWSWinControl{(ClassParent)}.SetBorderStyle(AWinControl, ABorderStyle);
|
||||
end;
|
||||
|
@ -172,6 +172,7 @@ type
|
||||
|
||||
TGtk2WSCustomEdit = class(TGtkWSCustomEdit)
|
||||
published
|
||||
class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle; override;
|
||||
class function GetSelStart(const ACustomEdit: TCustomEdit): integer; override;
|
||||
class function GetSelLength(const ACustomEdit: TCustomEdit): integer; override;
|
||||
class procedure SetEchoMode(const ACustomEdit: TCustomEdit; NewMode: TEchoMode); override;
|
||||
@ -851,6 +852,15 @@ end;
|
||||
|
||||
{ TGtk2WSCustomEdit }
|
||||
|
||||
class function TGtk2WSCustomEdit.CreateHandle(const AWinControl: TWinControl;
|
||||
const AParams: TCreateParams): TLCLIntfHandle;
|
||||
begin
|
||||
Result := TGtkWSCustomEdit{(ClassParent)}.CreateHandle(AWinControl, AParams);
|
||||
if Result <> 0 then
|
||||
gtk_entry_set_has_frame(PGtkEntry(Result),
|
||||
TCustomEdit(AWinControl).BorderStyle <> bsNone);
|
||||
end;
|
||||
|
||||
class function TGtk2WSCustomEdit.GetSelStart(const ACustomEdit: TCustomEdit
|
||||
): integer;
|
||||
var
|
||||
|
Loading…
Reference in New Issue
Block a user