Revit API

Active Contributor
Posts: 49
Registered: ‎04-29-2005
Message 1 of 3 (252 Views)

richtextbox and delete key

252 Views, 2 Replies
03-06-2011 01:25 PM

I wrote a routine that uses a richtextbox to allow the user to enter formatted text. However for some reason it doesn't capture the delete key (a character is not deleted). THe macro just lets it fall through to Revit which starts the erase command. I've tried setting the KeyPreview of the window form to TRUE but this had no affect.


If I create a simple windows app with a richtextbox I notice the default behaviour is to capture the delete key and delete the character. So I'm thinking there is something in the Revit API that is altering this behaviour.


Does anyone have any ideas how to make the delete key work?

Posts: 11
Registered: ‎03-23-2013
Message 2 of 3 (47 Views)

Re: richtextbox and delete key

11-17-2013 08:34 AM in reply to: phildebrandt

Did you ever figure this out?  I have a modeless form with a datagridview and while editing text in a cell, when Delete is pressed (to remove highlighted text), Revit starts the Delete command or deletes an element that is selected.  I tried capturing the Delete key in a KeyDown event but does not work.  Thanks.

Active Contributor
Posts: 49
Registered: ‎04-29-2005
Message 3 of 3 (29 Views)

Re: richtextbox and delete key

11-19-2013 12:39 PM in reply to: RevitArkitek
No I didn't.


You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community

Revit Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Revit helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Revit