Gtk+ problems (for beginners, at least) - was: gtk_text_set_point() does not actually show new pos?



Owen Taylor wrote:
> 
> Michael Elkins <Michael_Elkins@nai.com> writes:
> 
> > How do I make the point show up in the new location after a
> > gtk_text_set_point() call without inserting and then deleting a char?
> 
> void       gtk_editable_set_position    (GtkEditable    *editable,
>                                          gint            position);
> 
> (point != cursor position)

This is another example of a problem with GTK for beginners.

You have to know that you should look for a function name
containing
	"editable"
if you want to do something with a "text" widget.
The same is true for "GtkToolbar", e.g. you have to know
that you have to look for "container" to find a function which
allows you to remove one button / pixmap from the toolbar.

That means you have to know the hierarchy by heart (or print
it and look at it if you are looking for an existing function).

Now, I wonder, whether using Gtk-- will help me here.
Because inheritance in C++ can be used, I should be able to simply
call
	MytextWidget->set_position
or something like it.
This should work because the "text_widget" class is derived from the
'editable' class.
Is that what Gtk-- allows me to do ?
This would help me (and others) a lot, I guess.
And, one more reason to switch.

Thanks for your help,

Norbert.

-- 
Norbert Bladt		 Payphone Management System Software Development
ascom Autelca AG
Worbstrasse 201		 CH-3073 Guemligen, Switzerland
abladtn@autelca.ascom.ch VOICE: +41 31 999 6552, FAX: +41 31 999 6575



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