I actually tried to run down that path, but encountered the following 
problem.  My text entry box is of class Gtk::Entry.  The compiler that I 
am using (MSVS 2005) gives me an error when I try to use the 
get_editable_set_position() fn since it can't "convert parameter 1 from 
Gtk::Entry *' to 'GtkEditable *'". 

I can't find a member function similar to get_editable_set_position() that 
belongs to the Gtk::Entry class.  Like you said, it is not documented 
anyway.  Is there a way to type cast the GtK::Entry into a GtkEditable 
type?  Or is there a way to find a similar function that will operate on a 
Gtk::Entry type?   

Sorry for my confusion, I am pretty new to GTK and Gtkmm.  Thanks for your 
help!


Michael 




"Jonathon Jongsma" <[EMAIL PROTECTED]> 
02/21/2007 10:06 AM

To
"Michael Fasolino" <[EMAIL PROTECTED]>
cc
[email protected]
Subject
Re: Text Entry Box - text alignment






On 2/21/07, Michael Fasolino <[EMAIL PROTECTED]> wrote:
>
> I am currently porting an existing tool to be platform independent, so 
in order to keep the same look and feel, I would like to use a Text Entry 
box.  If it ends up that I can't do what needs to be done with the text 
box, than I will switch over to the  FileChooserButton.  Also, after 
searching for a while to find a way to align the text (when it is longer 
than the text entry can display) and not being able to find anything in 
gtkmm, I am kind of curious to hear if there is solution I am missing:)
>
> Thank you,
>
>  Michael

I've never tried to do this, so this is just a guess.  Could you do
what you want simply by setting the cursor position to the end of the
text entry box?  I think there's a set_position() function and passing
a value of -1 means to place the cursor at the end (It appears that
this function isn't documented in gtkmm, but that's what the GTK+ docs
say [1]).  I believe the default behavior of a GtkEntry is to 'scroll'
to show the cursor position, so this might do what you want.  But I
can't really test out my theory right now.

[1] 
http://developer.gnome.org/doc/API/2.0/gtk/GtkEditable.html#gtk-editable-set-position

-- 
jonner

_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to