Re: block textbuffer selection



Probably not the best way but.... you can do this by:


get_buffer()->signal_mark_set().connect(sigc::mem_fun(*this, &on_mark_changed));

.....

void on_mark_changed(Gtk::TextBuffer::iterator iter,
Glib::RefPtr<Gtk::TextBuffer::Mark> mark){
	if (mark->get_name()=="selection")
	{
                get_buffer()->place_cursor(get_insert().get_mark());
	}
}

It works in my head!

Good luck

Rob.

On 16/11/05, Anca Mitrica <ancamitrica yahoo com> wrote:
>  Hello,
>
>  I have an editor, made using Gtk::TextView and Gtk::TextBuffer. In one
> moment in my application I'd like to "block" the selection of the text in
> the textbuffer, so than i can still place mouse cursor in the text area
> desired.
>  In othe words, i want to be able to make "invisible" some how the blue
> colour of the selection made with the mouse on the text,  or to change this
> selection colour in white for example (the color of the background of the
> textview).
>  Can anybody knows how to do this?
>
>  Thank you in advance.
>
>  Anca
>
>
>  ________________________________
>  Yahoo! FareChase - Search multiple travel sites in one click.
>
>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>
>
>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]