Grasshopper

algorithmic modeling for Rhino

Winform textBox doesn't respond to enter, backspace, home, end, arrows...

Hi everyone, 

I have spent a long time to overcome this problem but I couldn't, 

The problem is: 

I'm trying to create custom attribute component called Gh_CPython which runs CPython codes from grasshopper, when double clicking on the component, it opens  a new winForm. 

I use library called ICSharpCode.TextEditor for Python syntax highlighting (similar to that used in Rhino Python Script Editor and GhPython Script Editor), The problem that I'm facing now is that this textEditor doesn't respond to Enter, backspace, arrows, pgdwn, pgup, end, home, delete ... and so on. but it respond to writing texts and spaces. 

I would like to ask if there is a known solution to this problem? 

Thanks so much. 

This video shows how to use the library: 

https://www.youtube.com/watch?v=qxEJhghCqmE

This is the link to GitHub for Gh_CPython:

https://github.com/MahmoudAbdelRahman/GH_CPython

Views: 653

Replies to This Discussion

Great project Tom! , Thanks for sharing. 

Why don't you continue it? It will be very useful. 

I was asking, what did you use for the syntax highlighting? 
I started using library called FastColoredTextBox but it still needs a lot of work. 

Thanks for sharing the code, I'll check it out. 

I see now that you have used FastColoredTextBox as well,
How did you manage to highlight comments , for example in Python (""" some text and linebreaks """). ?

Thanks so much. It seems that I have to learn regex from scratch ..
And yes, I agree with you, life is more..

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service