pbastia
Topic Author
Posts: 14
Joined: 15 May 2017, 19:19

Text Editing Caret and Highlighting missing in 2.1.0b4 & .NET4.6

26 Sep 2017, 20:37

I'm noticing that the caret / text highlight in a TextBox control are gone when using the .NET 4.6 profile. and the latest beta
The error doesn't occur when using the .NET 3.5 profile.
text_caret_selection_missing.png
Last edited by pbastia on 29 Sep 2017, 18:39, edited 1 time in total.
 
pbastia
Topic Author
Posts: 14
Joined: 15 May 2017, 19:19

Re: Text Editing Caret and Highlighting missing in 2.1.0b4 & .NET4.6

26 Sep 2017, 21:48

Oh, just realizing this is a duplicate of viewtopic.php?f=3&t=1185
 
User avatar
sfernandez
Site Admin
Posts: 1912
Joined: 22 Dec 2011, 19:20

Re: Text Editing Caret and Highlighting missing in 2.1.0b4 & .NET4.6

29 Sep 2017, 11:35

Yes, it should be fixed with the patch posted there: changing the return type of ShowSoftwareKeyboard callback to bool.

Assets/NoesisGUI/Plugins/API/Core/NoesisGUI.cs line 152
delegate bool ShowSoftwareKeyboardCallback(IntPtr focusedElement);
private static ShowSoftwareKeyboardCallback _showSoftwareKeyboard = ShowSoftwareKeyboard;
[MonoPInvokeCallback(typeof(ShowSoftwareKeyboardCallback))]
private static bool ShowSoftwareKeyboard(IntPtr focusedElement)
{
    try
    {
        if (_initialized)
        {
            UIElement element = Extend.GetProxy(focusedElement, false) as UIElement;
            return _softwareKeyboard.Show(element);
        }
    }
    catch (Exception e)
    {
        Noesis.Error.SetNativePendingError(e);
    }

    return false;
}
 
pbastia
Topic Author
Posts: 14
Joined: 15 May 2017, 19:19

Re: Text Editing Caret and Highlighting missing in 2.1.0b4 & .NET4.6

29 Sep 2017, 18:35

Works great, thanks so much! I'll mark this as fixed.

Who is online

Users browsing this forum: No registered users and 1 guest