Dockable Window using WindowsFormsHost

Dockable Window using WindowsFormsHost

annse
Enthusiast Enthusiast
878 Views
4 Replies
Message 1 of 5

Dockable Window using WindowsFormsHost

annse
Enthusiast
Enthusiast

Hi!

 

I have a Dockable Window containing a WinForms UserControl hosted by a WindowsFormsHost.

I'm having trouble with shortcut keys.

 

For example:

- Copy/Paste (Ctrl+c/Ctrl+v) in textboxes doesn't work.

- Selecting text in a textbox and hitting the Delete key triggers revit delete command prompting for a selection.

 

Shortcut keys are supported by WinForms and WPF interop.

https://msdn.microsoft.com/en-us/library/ms751797(v=vs.100).aspx

 

With a WPF UserControl in a Dockable Window the shortcut keys work as expected.

 

Does anyone know of a solution to this other than porting my WinForms UserControls to WPF?

 

Thanks

Annse

0 Likes
879 Views
4 Replies
Replies (4)
Message 2 of 5

Mustafa.Salaheldin
Collaborator
Collaborator

Is the Delete key hiting deletes the textbox then prompts in Revit or it is directly triger in Revit.


¯\_(ツ)_/¯
Let it work like a charm.

Mustafa Salaheldin


EESignature




Digital Integration Manager, DuPod

Facebook | Twitter | LinkedIn

0 Likes
Message 3 of 5

nitinjambhale
Advocate
Advocate
WPF is the only option for you. Also its very scalable.
0 Likes
Message 4 of 5

manfred.rosskamp
Observer
Observer

Hi, are there any news on this topic?

 

0 Likes
Message 5 of 5

FilipNekic
Contributor
Contributor

@annse For Windows Forms, you can use ComboBox Control, just set DropDownStyle to "Simple" to mimic Textbox.

For Combobox, shortcut keys are working. 

0 Likes