[Glade-users] How to deal with multi-line input ?



\> On Tue, Nov 10, 2009 at 2:35 AM, Tristan Van Berkom
<tristan.van.berkom at gmail.com> wrote:

On Mon, Nov 9, 2009 at 6:16 PM, Raji Seetharaman <sraji.me at gmail.com>
wrote:


Hi

Can anyone say how to recieve multiline input from the user at runtime
using
Python and Glade?

You need to setup a GtkTextView/GtkTextBuffer.

Make sure the GtkTextView is "editable" and then
connect to the "changed" signal on the GtkTextBuffer.

Cheers,
? ? ? -Tristan


Hi


Hi, please keep the discussion on the public list ;-)

I did it with GtkTextView only & also it is editable.

It is said that a TextBuffer can be created automatically when a TextView is
created.

I don know how to include GtkTextBuffer manually


You can: go in the "text buffers" section of the palette and create
one in the project,
or more easily, just go set the "buffer" property in the text view properties.

When the dialog to select a buffer comes up, just press "New".

In the signals column i can find the signals related to GtkTextView not
GtkTextBuffer


You will find the GtkTextBuffer signals on the new GtkTextBuffer object ;-)

U can find the python file here http://pastebin.com/m67bb99fd

U can find the glade xml file here http://pastebin.com/m4702e044


Cheers,
      -Tristan




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