PartEditBox DropDown Caret 'sticking'

Editors for WPF Forum

Posted 8 years ago by Matt Swanton
Version: 15.1.0624
Avatar

Hi,

I have a custom PartEditBox with some text boxes in the drop down content.  When the keyboard focus switches between each text box the caret remains visible even though the focus is in a different text box.

Some sample code to reproduce this is below.

I am using version 14.2.0610.

Can anything be done to fix this?

Thanks in advance

Matt

        <editors:PartEditBox Grid.Row="0"
                             DropDownButtonVisibility="Visible">
            <editors:PartEditBox.DropDownContent>
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>

                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="300" />
                    </Grid.ColumnDefinitions>
                    
                    <TextBox Grid.Row="0"
                             Grid.Column="0"
                             Margin="2" />
                    <TextBox Grid.Row="1"
                             Grid.Column="0"
                             Margin="2" />
                    <TextBox Grid.Row="2"
                             Grid.Column="0"
                             Margin="2" />
                </Grid>
            </editors:PartEditBox.DropDownContent>
        </editors:PartEditBox>

Comments (5)

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

Hi Matt,

That's reallly odd.  We've only seen that behavior when dealing with focus scopes and the TextBox thinks focus has moved to a child focus scope.  In this case the TextBoxes are not in their own focus scope either, and we don't appear to have any code in Editors that changes focus scopes.

We weren't able to find a fix but if you switch your TextBox to be editors:TextBox instead, it seems to work there.


Actipro Software Support

Posted 8 years ago by Matt Swanton
Avatar

Hi,

Thanks for the prompt response. 

I'll investigate switching to editors:TextBox which, as you say, appears to work fine.

Can I ask one more question using the same sample code?  If you put the focus in one of the textboxes and click on the drop down button to close the popup, it needs two clicks to close (the first click appears to re-open the popup).

If I do the same thing using editors:TextBox it actually needs three clicks - the first to set the focus to the drop down button, and then two more to close.

Is there any way around this?

Thanks

Matt

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

Hi Matt,

We were able to sort out the cursor issue with regular TextBoxes.  We had a LostFocus handler in the PartEditBox that would handle the event in a certain scenario.  We are not sure that old code is still needed so we have commented it out for the next version (2016.1).  I'm not sure how you could work around this in the 2014.2 version unless you can somehow remove the event handler tie to the part edit box's LostFocus event that we set up in its constructor.

We are still looking into the popup not toggling correctly when clicking the popup button again after the popup is already open.


Actipro Software Support

Posted 8 years ago by Matt Swanton
Avatar

Hi,

Thanks again for the reply.  I can confirm that the problem is resolved if we use reflection to unsubscribe the event handler.

This is good news because in the end we couldn't use the Actipro TextBox because we needed features such as vertical alignment and text wrapping.

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

Hi Matt,

I believe we have the other issue with clicking the drop-down button fixed for the 2016.1 version.  That required internal code changes.


Actipro Software Support

The latest build of this product (v24.1.1) 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.