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



At 07:31 04/05/99 +0200, you wrote:
>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 ?
Yes, that's all the power of Gtk-- which allows you to use c++
object-features when manipulating gtk+ objects : polymorphism, inheritance...
If you are familiar with c++ (or if you want to learn), I think gtk-- is
something great to handle gtk+ programming.

Manu



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