FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Text boxes - Multiline

 
Post new topic   Reply to topic     Forum Index -> gtkD
View previous topic :: View next topic  
Author Message
joelcnz



Joined: 23 Feb 2009
Posts: 76

PostPosted: Sat May 07, 2011 4:56 pm    Post subject: Text boxes - Multiline Reply with quote

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
View user's profile Send private message MSN Messenger
Mike Wey



Joined: 07 May 2007
Posts: 428

PostPosted: Sun May 08, 2011 8:23 am    Post subject: Reply with quote

You would use gtk.Textview and gtk.Textbuffer.
Back to top
View user's profile Send private message
joelcnz



Joined: 23 Feb 2009
Posts: 76

PostPosted: Sun May 08, 2011 5:09 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
Mike Wey



Joined: 07 May 2007
Posts: 428

PostPosted: Tue May 10, 2011 11:55 am    Post subject: Reply with quote

Generally you would get the Buffer from the view using getBuffer.

Code:
TextView view = new TextView();
TextBuffer buffer = view.getBuffer();
Back to top
View user's profile Send private message
joelcnz



Joined: 23 Feb 2009
Posts: 76

PostPosted: Wed May 11, 2011 7:45 am    Post subject: Reply with quote

Thanks very much Mike Wey Cool. 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
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> gtkD All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group