Regex Input #5442
              
                Unanswered
              
          
                  
                    
                      dor-schreiber
                    
                  
                
                  asked this question in
                Q&A
              
            
            
              Regex Input
            
            #5442
          
          
        Replies: 2 comments 1 reply
-
| Rather than try to implement your own input widget from scratch, perhaps worth investigating the  You can learn more about creating custom highlighters in the Rich docs: https://rich.readthedocs.io/en/stable/highlighting.html | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            -
| @TomJGooding | 
Beta Was this translation helpful? Give feedback.
                  
                    1 reply
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I love the repo!
I'm working on a TUI for regex testing and I want to make an input that highlights each letter based on the char type (letter, number, brackets, etc.) I'm having trouble creating this widget and using it as an input.
I want it to have the same style as the input (cursor, copy and paste).
Inherit the Input widget didn't make much sense (Maybe I'm wrong).
My solution was to use labels in a widget that listen to key presses when in focus but I couldn't make it (The key press isn't being detected).
Code:
Another issue is TextArea for test strings that can be multi-lines.
I want to have the ability to color a certain char by the index of the char or a range of indexes. To show matches
Any ideas on how I can make it work?
Beta Was this translation helpful? Give feedback.
All reactions