Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: Text widget inert mode on and off
Post: Text widget: insert and overwrite modes?
From what I can read online about the Text widget, it doesn't support the concept of having insert and overwrite modes correct? If I wanted to have those features, I'd have to code that up myself? Or ... |
|
rfresh737 |
GUI |
5 |
3,895 |
Apr-19-2021, 02:59 AM |
|
|
Thread: Text widget inert mode on and off
Post: RE: Text widget inert mode on and off
>as far cursors you need to change them manually
Are you referring to text.config(cursor="dot blue") or something else?
>t.config(state='disabled')
I don't want to make my text widget read-on... |
|
rfresh737 |
GUI |
5 |
3,895 |
Apr-18-2021, 05:49 PM |
|
|
Thread: Text widget inert mode on and off
Post: Text widget inert mode on and off
I can't find anything that talks about how to set a text widget insert mode on and off? My text widget is always in insert mode. I assume I can set it to an overwrite mode as well?
UPDATE:
Here are ... |
|
rfresh737 |
GUI |
5 |
3,895 |
Apr-18-2021, 03:34 PM |
|
|
Thread: Text.search() regexp not working
Post: RE: Text.search() regexp not working
Yep, \y worked for me too. Much thanks.
I had to back down from python 3.9 to 3.6 (last month) because there is a notebook tab color bug in 3.9. My project uses tabs and I needed to change their colo... |
|
rfresh737 |
GUI |
11 |
5,035 |
Apr-16-2021, 06:56 PM |
|
|
Thread: Text.search() regexp not working
Post: RE: Text.search() regexp not working
Here's a complete test app showing that once you add the ^ and $ idx returns '' and no word highlighting.
BTW I'm running python 3.6, could that be the reason?
from tkinter import *
class Appli... |
|
rfresh737 |
GUI |
11 |
5,035 |
Apr-16-2021, 06:12 PM |
|
|
Thread: Text.search() regexp not working
Post: RE: Text.search() regexp not working
Yes but that is for the non-regexp usage an I couldn't get it to work.
I discovered '(?i){keyword}' works with your code snippet regexp.
Thank you... |
|
rfresh737 |
GUI |
11 |
5,035 |
Apr-16-2021, 05:50 PM |
|
|
Thread: Text.search() regexp not working
Post: RE: Text.search() regexp not working
One more question if I may: how do i add the case insensitive flag? |
|
rfresh737 |
GUI |
11 |
5,035 |
Apr-16-2021, 05:31 PM |
|
|
Thread: Text.search() regexp not working
Post: RE: Text.search() regexp not working
I'll have to dig deeper in my project and see why it works for you and not me.
Thank you for the help... |
|
rfresh737 |
GUI |
11 |
5,035 |
Apr-16-2021, 05:14 PM |
|
|
Thread: Text.search() regexp not working
Post: RE: Text.search() regexp not working
'^{keyword}$' finds the word but idx returns ''
If I remove the ^ and $ then idx returns a value (and that lets me highlight the target word in my text widget). |
|
rfresh737 |
GUI |
11 |
5,035 |
Apr-16-2021, 05:04 PM |
|
|
Thread: Text.search() regexp not working
Post: Text.search() regexp not working
My code below uses text_widget.search() with regexp=True but it's not finding my target word. Can someone tell me what I am missing?
I also have a non-regexp search which works and highlights the tex... |
|
rfresh737 |
GUI |
11 |
5,035 |
Apr-16-2021, 03:31 PM |
|
|
Thread: Line numbers in Text widget
Post: RE: Line numbers in Text widget
I added some code to improve it and noted some issues:
(1) Here is a link to a test file with 200 lines, with each line numbered.
line_test.txt file
(2) when the app starts up, the text widget gets... |
|
rfresh737 |
GUI |
3 |
5,434 |
Apr-15-2021, 12:30 PM |
|
|
Thread: Line numbers in Text widget
Post: RE: Line numbers in Text widget
Thanks for that. Can you explain what your lines 14 and 15 are doing? |
|
rfresh737 |
GUI |
3 |
5,434 |
Apr-15-2021, 11:28 AM |
|
|
Thread: Line numbers in Text widget
Post: Line numbers in Text widget
I've been looking at adding line numbers to a Text widget. There are several examples floating around the internet, all a bit different in most cases.
I found one that seemed fairly simple to impleme... |
|
rfresh737 |
GUI |
3 |
5,434 |
Apr-15-2021, 01:31 AM |
|
|
Thread: Treeview scroll selected node to top
Post: Treeview scroll selected node to top
I have a treeview widget. I've been unable to find any examples that use the treeview.see() method to scroll the selected node to the top of the treeview.
If someone can post a link that shows how to... |
|
rfresh737 |
GUI |
1 |
2,727 |
Apr-14-2021, 01:35 AM |
|
|
Thread: pyautogui attribuyes not found
Post: RE: pyautogui attribuyes not found
(Feb-24-2021, 12:01 AM)deanhystad Wrote: Did you identify why the old install failed?
Sorry, no I did not. |
|
rfresh737 |
GUI |
7 |
3,072 |
Apr-14-2021, 01:32 AM |
|
|
Thread: Panedwindow
Post: RE: Panedwindow
Your fix worked! Thank you very much! |
|
rfresh737 |
GUI |
2 |
2,216 |
Apr-03-2021, 03:40 PM |
|
|
Thread: Panedwindow
Post: Panedwindow
(1) I'm trying to understand why my root.bind("<Configure>", resize) line fires when I drag my panedwindow sash left and right? This does not change the root window's width or height or x or y v... |
|
rfresh737 |
GUI |
2 |
2,216 |
Apr-03-2021, 01:24 PM |
|
|
Thread: pyautogui attribuyes not found
Post: RE: pyautogui attribuyes not found
My re-install was successful...yahoo!!! |
|
rfresh737 |
GUI |
7 |
3,072 |
Feb-23-2021, 11:58 PM |
|
|
Thread: pyautogui attribuyes not found
Post: RE: pyautogui attribuyes not found
I'm using Python 3.7
Raspberry Pi 4
I used pip3 to install it.
When I run help(pyautogui) in my nano script:
Help on Module pyautogui:
NAME
pyautogui
FILE
/home/pi/pyautogui.py
NONE
The above disp... |
|
rfresh737 |
GUI |
7 |
3,072 |
Feb-23-2021, 03:23 PM |
|
|
Thread: pyautogui attribuyes not found
Post: RE: pyautogui attribuyes not found
>>>import pyautogui
bash: import: command not found
I put
import pyautogui
print(dir(pyautogui))
into a script and ran it:
pi@raspberrypi:~ $ nano pyautogui.py
pi@raspberrypi:~ $ p... |
|
rfresh737 |
GUI |
7 |
3,072 |
Feb-23-2021, 03:40 AM |