[gtkada] Text_Buffer selection

Nicolas Setton setton at act-europe.fr
Mon Jul 21 16:01:37 CEST 2003


On Mon, 2003-07-21 at 15:53, Manuel Op de Coul wrote:
> I'm looking for the equivalent of Gtk.Editable.Select_Region in
> Gtk.Text_Buffer but am unable to find it.
> There is a procedure Get_Selections_Bounds, but not
> Set_Selection_Bounds. How is this done, the option is in
> default context menus?

As you have guessed, you have to play with the selection bounds. These
are internally handled as named marks, so all you have to do is
something like

      Move_Mark_By_Name (Buffer, "insert", Iter_1);
      --  This moves the cursor

      Move_Mark_By_Name (Buffer, "selection_bound", Iter_2);
      --  This moves the selection bound


Nico



More information about the gtkada mailing list