- TCustomMemo.WantTabs for gtk2

git-svn-id: trunk@11131 -
This commit is contained in:
paul 2007-05-12 12:30:18 +00:00
parent 8d7812da86
commit 3f6445f154
2 changed files with 14 additions and 0 deletions

View File

@ -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

View File

@ -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 }