Option to make text box read-only

Started by Deeman, 21 March 2014, 09:30:27

Deeman

I would love too see this option so you can have a text box which the user can't modify but still mark and copy if he want's to.
This feature could serve as a simple chat box with a read-only text box above another read-and-write text box.
The read-onyl text-box above would store every message from the past and the read-and-write text box would server as a text input to post a message.

texus

If you don't need to copy & paste then you can use the ChatBox widget (which allows different text colors). In the future it is even the goal to allow you to select text inside it and allow copy & pasting. So once this is done, what you are requesting would no longer be needed.

But I will have a look later today if the TextBox can be made read-only easily. If it isn't too hard to do then I'll make the change, as having a selectable ChatBox is something you won't see in the near future.

Deeman

Quote from: texus on 21 March 2014, 11:15:52
If you don't need to copy & paste then you can use the ChatBox widget (which allows different text colors).
Oh boy I'm using Tgui for weeks now and it's the first time I heard about that widget.
Then I'm sorry for posting this and wasting your time.

On a side note, can I ask you if you plan on implementing a cross-plattform clipboard support that let's you paste text into tgui from the OS' clipboard ? (Copying text from another program and pasting it into tgui)

Great project btw : D

texus

QuoteOn a side note, can I ask you if you plan on implementing a cross-plattform clipboard support that let's you paste text into tgui from the OS' clipboard ? (Copying text from another program and pasting it into tgui)
I originally wanted to implement the clipboard like that, but it was too hard on linux. It works with events, which are handled by sfml and would thus be hard to intercept.
It would be doable on windows, and I am considering adding this feature and make it windows only (even though I kindof hate windows). I haven't looked at mac yet, so maybe I can support it on mac too, but most likely it will involve objective-c code.

Basically I'm not really thrilled to start working on it, there are other features that currently have priority.