View previous topic :: View next topic |
Author |
Message |
joelcnz
Joined: 23 Feb 2009 Posts: 76
|
Posted: Sat May 07, 2011 4:56 pm Post subject: Text boxes - Multiline |
|
|
How do I go about adding text boxes, (like a note pad would use as its writing area)?
I'm using Windows D2.052. May use Ubuntu as well, just for fun. |
|
Back to top |
|
|
Mike Wey
Joined: 07 May 2007 Posts: 428
|
Posted: Sun May 08, 2011 8:23 am Post subject: |
|
|
You would use gtk.Textview and gtk.Textbuffer. |
|
Back to top |
|
|
joelcnz
Joined: 23 Feb 2009 Posts: 76
|
Posted: Sun May 08, 2011 5:09 pm Post subject: |
|
|
I've looked at examples, and generated html files and looked there.
I don't know create a TextBuffer object. What do I do for 'GtkTextBuffer*' in 'this(GtkTextBuffer* gtkTextBuffer)'? |
|
Back to top |
|
|
Mike Wey
Joined: 07 May 2007 Posts: 428
|
Posted: Tue May 10, 2011 11:55 am Post subject: |
|
|
Generally you would get the Buffer from the view using getBuffer.
Code: | TextView view = new TextView();
TextBuffer buffer = view.getBuffer(); |
|
|
Back to top |
|
|
joelcnz
Joined: 23 Feb 2009 Posts: 76
|
Posted: Wed May 11, 2011 7:45 am Post subject: |
|
|
Thanks very much Mike Wey . I can read and write text, like pasting from the text box into the terminal etc.
I've got a game library a falling objects etc library and this library used in one program. So the program has a GUI a terminal, and a game window. I'm not sure it'll hold together. The falling objects (that's all I can do at the moment, a flatmate helped me out) library is Blaze and doesn't seem to be active, I played around to get it to go. You have to close the terminal to filly close the program. Clicking the open the game window while it is already open can cause trouble. |
|
Back to top |
|
|
|