Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing cursor color in a text input box #614

Open
lowcam opened this issue Apr 27, 2020 · 2 comments
Open

Changing cursor color in a text input box #614

lowcam opened this issue Apr 27, 2020 · 2 comments

Comments

@lowcam
Copy link

lowcam commented Apr 27, 2020

Bug Report


Sorry, this isn't truly a bug report. I just couldn't find this information on the appJar.info site. I was wondering if there was a way to change the color of the cursor in a text input box.

Context


I am designing an app and have both a light version and a dark version. In the dark version, with dark backgrounds and light foregrounds, the cursor does not change colors and remains black. This makes selecting text difficult because I can't see where the cursor is.

Expected Behaviour


Be able to change the color of the flashing cursor to a lighter color.

Actual Behaviour


The cursor remains black which makes it hard to find with a dark background.

Any error messages produced by appJar


None

Sample code, demonstrating the issue


app.addLabelEntry("TextString")
app.setEntryBg("TextString","#0F2439")
app.setEntryFg("TextString","#9d968d")

What steps are needed to reproduce the bug


Use the above code, enter text into the text box, and try to find the cursor.

Version Information


Replace this with the result of running your code with the -v flag: python myCode.py -v
appJar: 0.94.0 Python: 3.7.6 TCL: 8.6, TK: 8.6 Platform: Windows pid: 2144
locale: en_US
dark_text_box

@jarvisteach
Copy link
Owner

Anything that's possible in Tkinter is possible in appJar!

I don't this is a config option that has been exposed through the appJar interface yet, so you'll have to use a Tkinter command on the widget.

e = app.entry('Name:', label=True, bg='black', focus=True, fg='white')
e.config(insertbackground='red')

@jarvisteach
Copy link
Owner

Or, do it in one line:

app.entry('Name:', label=True, bg='black', focus=True, fg='white').config(insertbackground='red')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants