RE: Linking gtktext with adjustments?
- From: id072647 belgacom be
- To: gtk-list gnome org
- Subject: RE: Linking gtktext with adjustments?
- Date: Tue, 27 Feb 2001 14:30:44 +0100
Position Y?
If I understand: you will have to substract or add <W> from the current
cursor position.
Reposition the cursor with gtk_editable_set_point. To find <W>, you will
have to know the length in characters in one line of your gtk_text widget.
Substract or add <W> from gtk_editable_get_point and you will scroll
vertically.
Hope this helps.
Fabrisio
-----Original Message-----
From: Raymond Wan [mailto:rwan cs mu oz au]
Sent: Tuesday 27 February 2001 13:41
To: gtk-list gnome org
Subject: Linking gtktext with adjustments?
Hi,
I've been working with a text widget and scrollbars and I'm
having a problem with something. I have the two working together but what
I would like to do is to scroll the vertical scrollbar so that position X
of the displayed document in the text widget is at the top of the
window...
I thought it would be easy, but it doesn't seem easy anymore. I
can change the current position of the curson in the text widget. I
haven't tried, but I do know that I can also explicitly change the
adjustments widget so that it can go to a particular position using the
gtk_adjustment_set_value function. However, I can't see how I can relate
a position in the text with the floating point value (called "value") in
the GTK_ADJUSTMENT structure.
I'm not using a fixed-width font now, but even if I did, I still
don't know how I could relate the two so that even if I resize the window,
the movement will still work. Does anyone have an idea?
Thank you!
Ray
**** DISCLAIMER ****
"This e-mail and any attachments thereto may contain information
which is confidential and/or protected by intellectual property
rights and are intended for the sole use of the recipient(s) named above.
Any use of the information contained herein (including, but not limited to,
total or partial reproduction, communication or distribution in any form)
by persons other than the designated recipient(s) is prohibited.
If you have received this e-mail in error, please notify the sender either
by telephone or by e-mail and delete the material from any computer.
Thank you for your cooperation."
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]