I am just starting out to use tkinter in Python 3.5 and I don't understand it the best yet but hopefully will over time.
Anyway, what I was asking was how do I create a text box that a user can type into, I know it is possible but don't yet know how to execute this as, as I said at the beginning, I'm just starting out.
If there is any scaffolding code of a box that I could use to that would allow a user to enter text, it would be a great help if you could show it to me.
Also, to interact with this input, would it be the same as python?
I know this is a lot to be asking but any responses are welcome,
Thanks in advance :)
Both of the following links contain code relating to text entry.
http://effbot.org/tkinterbook/entry.htm
http://effbot.org/tkinterbook/text.htm
Entry is a single line box.
Text is a multiple line box and supports text formatting
Related
I've looked at the documentation of Starlette, and can't seem to figure out how to take the content of a text box and link it to a python variable. The plan is to have a user enter text into several text boxes, click a button, and then the information will be used for an SQL query.
I really have no idea how to proceed.
Edit: I think people are misunderstanding. There is no code yet. I don't know how to reference a text box using Starlette.
I am working on a Pyqt5 soft which can print a text in a qtext edit.
2 qcombobox allows the user to choose the text.
The text displayed in the qtext edit is loaded from json files.
This part of the soft is ok.
For now, i want the user to be able to edit the files ( i need to change style, especially put the text in bold).
I think that the best way to do it is with html, but i can’t manage the balise insertion.
I also face issues by selecting only part of the text.
i don't really understand the cursor/ anchor fonctions and don't have find explicit documentation.
Any one to give me an advice, or even part of the code that can help me ?
thank you in advance !
I have created an application using Tkinter and am trying to re-implement it using AppJar. I am able to get the selected text from a textbox using
textWidget.get (Tkinter.SEL_FIRST,Tkinter.SEL_LAST)
I can't find any information on how to do this with AppJar, althought there is a list of tag related functions and mention of a "sel" tag. I've tried as many permutations as I can think of and nothing has worked.
I am sure it is very simple.
Can anyone help?
Thanks,
Randy
It is simple :)
Have a look here: http://appjar.info/inputWidgets/#get-textareas
app.getTextArea('title')
I designed a character creation page, and included a bit where a person can input their name with ui.input() but the problem is, they can't push any buttons or do anything at all without submitting the text first and I am trying to figure out how to turn this ui.input into a clickable so it is only active when its selected.
Then engine has a page on the ui.input (and includes explaining that the button arg is possible) but it doesn't really give me any other example other than button=None. and anything else I try, the game won't even load.
Sorry if this is a really noob question. Seems like the most simple thing.
This is what I have for that part if it helps..
ui.input('', xalign=0.5, yalign=0.5)
first_name = ui.interact()
How about creating a character creation screen and using a graphic button?
In a custom screen, you can control everything using buttons and code, which is, in some senses, outside of your story.
Is there any way of getting some input from a user in matplotlib? For example, a drop down list or a text box? What alternatives are there?
If there isn't anything, what would be the easiest way of displaying data based on what a user's input would be?
This could be a very very WIDESPREAD answer...
What exactly do you mean when you say "input from user?"
if you are just talking about a textbox and an okay button then
raw_input('Enter your text')
If you're wanting something a bit more sophisticated and controllable I suggest looking into the Tkinter tools and creating your own GUI where you can create things like combo boxes, checkboxes, entry widgets, popup boxes, and a lot more.
if this doesn't exactly answer what you are asking please post an example of your code then add something like
code code code
#HERE YOU WOULD PUT WHAT YOU WANT TO ACCOMPLISH
code code code