mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-10 18:19:40 +02:00
- TCustomMemo.WantTabs for gtk2
git-svn-id: trunk@11131 -
This commit is contained in:
parent
8d7812da86
commit
3f6445f154
@ -126,6 +126,8 @@ begin
|
||||
else
|
||||
gtk_text_view_set_wrap_mode(PGtkTextView(TempWidget), GTK_WRAP_NONE);
|
||||
|
||||
gtk_text_view_set_accepts_tab(PGtkTextView(TempWidget), TCustomMemo(AWinControl).WantTabs);
|
||||
|
||||
gtk_widget_show_all(Widget);
|
||||
|
||||
SetCallbacks(Widget, WidgetInfo);
|
||||
@ -216,6 +218,17 @@ begin
|
||||
gtk_text_buffer_move_mark(TextBuffer, gtk_text_buffer_get_insert(TextBuffer), @StartIter);
|
||||
end;
|
||||
|
||||
class procedure TGtk2WSCustomMemo.SetWantTabs(const ACustomMemo: TCustomMemo;
|
||||
const NewWantTabs: boolean);
|
||||
var
|
||||
TextView: PGtkTextView;
|
||||
begin
|
||||
if not ACustomMemo.HandleAllocated then exit;
|
||||
|
||||
TextView := PGtkTextView(GetWidgetInfo(Pointer(ACustomMemo.Handle), False)^.CoreWidget);
|
||||
gtk_text_view_set_accepts_tab(TextView, NewWantTabs);
|
||||
end;
|
||||
|
||||
class function TGtk2WSCustomMemo.GetSelStart(const ACustomEdit: TCustomEdit
|
||||
): integer;
|
||||
var
|
||||
|
@ -194,6 +194,7 @@ type
|
||||
class procedure SetFont(const AWinControl: TWinControl;const AFont : TFont);override;
|
||||
class procedure SetSelStart(const ACustomEdit: TCustomEdit; NewStart: integer); override;
|
||||
class procedure SetSelLength(const ACustomEdit: TCustomEdit; NewLength: integer); override;
|
||||
class procedure SetWantTabs(const ACustomMemo: TCustomMemo; const NewWantTabs: boolean); override;
|
||||
end;
|
||||
|
||||
{ TGtk2WSEdit }
|
||||
|
Loading…
Reference in New Issue
Block a user