Can't edit TextBox within WindowControl

Docking/MDI for WPF Forum

Posted 6 years ago by Bret Naughton
Version: 13.2.0592
Avatar

Hi

I have created a wpf window control successfully and I have populated it with a listbox with each listbox item containing a grid control with various textboxes/checkboxes etc. All is working fine except for one issue.

I am allowing the user to enter text into one of the text boxes in each listbox item. The problem is it does not matter what I do I can't enter any text through the keyboard. I can populate the textbox programatically okay, and also if the user selects some text in the textbox and drags the subset text around (i.e. select the last 3 characters of the textbox and drag to the beginning of the textbox) then I can enter some characters, but as soon as the focus is lost then I cannot enter the textbox again.

The text box is set to not be readonly and is focused. Also when clicking on the text the cursor positions itself correctly in between the correct characters - but I can't enter anything.

I have also noticed that when I move focus off my application completely then I can no longer select any text at all.

 

The textbox works fine in toolwindow headers/main application but not in the windowcontrol.

Any ideas or known issues/workarounds would be appreciated.

Thanks.

Comments (3)

Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Bret,

I'm not sure what on our end could be causing that, we haven't heard of it before. 

There shouldn't really be anything fancy going on with WindowControl.  It's just a styled ContentControl and we don't handle any key or text input events.  I am curious if you can repro the same issue if you use a native WPF ContentControl instead of WindowControl.


Actipro Software Support

Posted 6 years ago by Bret Naughton
Avatar

Hi,

Tried using the content control and the same thing happens.

Investigating further I have found the following. When I open the windowcontrol which is positioned on top of my application I can click on the textbox but cannot enter any text even though the cursor is positioned in the textbox. However if I then click on my main application and then click in the textbox I can enter 1 character only. I can then repeat the clicking of my application and then clicking in the textbox and entering one character but that is all.

As mentioned I have done nothing to the textbox except add some default text to it (also tried not entering any default text and the same thing occurs).

So no luck so far. I don't know if the above is any assistance in tracking down this issue.

Are you able to successfully add a text box to a windowcontrol your side to see if this replicates my issue?

Thanks

Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Bret,

I'm really not sure what's going on in your situation since it sounds like something external might be causing problems.  We have a WindowControl QuickStart in our Sample Browser that contains a TextBox and everything works fine there for us.  Try checking that sample out.


Actipro Software Support

The latest build of this product (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.