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')
Related
I'm trying to get a notification in Python where I can add some options and then save whatever the user has selected.
It would be something like this:
I tried win10toast, player, and now I'm using winotify.
None of them have this function. The closest one would be Winotify, where I can add buttons which can be used as "options". The thing is that it has a limit of 5 buttons, so if I eventually have more than 5 options, I couldn't go that way.
I've been looking for a while, but I couldn't find anything like this. Is there a workaround to get a similar result?
I'd appreciate any help. Thanks in advance!
I am going to make the selected text italic in PyQt text editor
Scenario 1
Scenario 2
The images are pretty self explaining.You will probably say then why don't you
just you textEdit.setFontItalic() then actually I am already using that but
textEdit doesn't have overline and strikeout while QTextCharFormat has ton of
properties but it has it's problems
textEdit.setCurrentCharFormat(),setCurrentFont(),setStyleSheet,setFont() but all
cause the same problem as QTextCharFormat
is there a way around this
thanks
Hey guys I have got the answer.
instead of cursor.setCharFormat() use cursor.mergeCharFormat()
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
I'm new to programming in python, but I've went through tutorials which taught me how to create click-able images and connecting them to trigger a callback function.
I am trying to write a script which will allow me to click an image, and move onto a new window or "page" of different click-able images.
Is there a way for me to do this using pygtk? I thought about creating classes and using an if else statement to poll through classes I wanted to use, but it hasn't worked for me. Or am I suppose to continuously hide and show buttons and images?
Is there a way to modify the sample code I've been using to accomplish my goal?
http://pygtk.org/pygtk2tutorial/examples/images.py
Any help would be appreciated, thanks!
You can use a GtkNotebook and hide its tabs. Whenever you need to change page, just switch the current page of the GtkNotebook.
I have TextView with pages of text, but I want to be able to highlight (change the background color) of specific strings in different colors. Is this possible? If so, can anybody point me in the right direction? Thanks
Haven't tried this myself, but TextBuffer.insert_with_tags with a properly configured TextTag looks promising.
If the specific strings are always the same, as in a programming language, then use GtkSourceView instead.