GUI Textbox : Can I make it read-only? [SOLVED]

Started by poc301, Wed 09/02/2011 16:37:40

Previous topic - Next topic

poc301

Let me preface this by saying I am still using AGS 2.72 at the moment, but as soon as the game is done, I'll be upgrading.

That said, I am having a problem in a GUI with a text box.  I have a "notebook" type GUI that is used to put notes in so the player can review any info learned in the game.

There is a listbox with topics, and once clicked, it populates the textbox on the GUI with the details of the item.  It all works great, however someone can simply click in the textbox and delete and enter new info.  And the info saves automatically since when you exit and go back in, the info is there.

Is there a way to lock the GUI's textbox and make it read-only?

Thanks,

Bill

ddq

I'm pretty sure setting textBox.Enabled to false will accomplish this, but I could be wrong. If that doesn't work, you could play around with labels instead, hiding the textbox and showing the label whenever an item is clicked.

EDIT: Of course, not sure how well any of this would work with 2.72.

poc301

TextboxName.Enabled = false; 


Perfect!  I couldn't find that in the manual, but should've assumed something like it would be in the editor.

I appreciate the help, it works perfectly.

Thanks,

Bill

Khris

Wait, what's wrong with using a label? It's their explicit purpose to display unalterable text.

poc301

Quote from: Khris on Wed 09/02/2011 16:54:50
Wait, what's wrong with using a label? It's their explicit purpose to display unalterable text.

I used the textbox because there is a lot of data I need to put up.  Which brings me to another question I'm about to post :)

Thanks,

Bill

SMF spam blocked by CleanTalk