riveranb
Topic Author
Posts: 10
Joined: 20 Aug 2019, 05:48

MenuItem with TextBox possible?

14 Feb 2020, 15:00

I'm new to WPF xaml.
I want to design customized MenuItem, so I try with some snippets like this
(reference: https://stackoverflow.com/questions/154 ... ving-mouse)
I designs a ContextMenu.
<ContextMenu>
...
<MenuItem>
    <MenuItem.Header>
        <Border>
            <TextBox Width="50" Height="20"/>
        </Border>
    </MenuItem.Header>
</MenuItem>
</ContextMenu>
It works in Blend project side, which appears like this way.
Image

But in Unity editor, the ContextMenu with TextBox-MenuItem is also displayed correctly.
But when I click the TextBox trying to input something, it encounters exception.
[noesis] Visual is not a descendant of the specified ancestor
UnityEngine.Debug:LogError(Object)
NoesisUnity:UnityLog(Int32, String) (at Assets/NoesisGUI/Plugins/NoesisUnity.cs:116)
Noesis.NoesisGUI_PINVOKE:Visual_TransformToAncestor(HandleRef, HandleRef)
Noesis.Visual:TransformToAncestor(Visual) (at Assets/NoesisGUI/Plugins/API/Proxies/Visual.cs:87)
IME:UpdateCursor() (at Assets/NoesisGUI/Plugins/NoesisUnity.cs:191)
IME:Open(UIElement) (at Assets/NoesisGUI/Plugins/NoesisUnity.cs:156)
NoesisUnity:SoftwareKeyboard(UIElement, Boolean) (at Assets/NoesisGUI/Plugins/NoesisUnity.cs:332)
Noesis.GUI:OnSoftwareKeyboard(IntPtr, Boolean) (at Assets/NoesisGUI/Plugins/API/Core/NoesisGUI.cs:267)
Noesis.View:Noesis_View_MouseButtonDown(HandleRef, Int32, Int32, Int32)
Noesis.View:MouseButtonDown(Int32, Int32, MouseButton) (at Assets/NoesisGUI/Plugins/API/Core/View.cs:126)
NoesisView:ProcessEvent(Event, Boolean, Boolean, Boolean) (at Assets/NoesisGUI/Plugins/NoesisView.cs:936)
NoesisView:OnGUI() (at Assets/NoesisGUI/Plugins/NoesisView.cs:1045)
So I want to ask if I'm doing something wrong?
Or this is not supported yet?
I am using NoesisGUI v2.2.4 now.

Tags:
 
riveranb
Topic Author
Posts: 10
Joined: 20 Aug 2019, 05:48

Re: MenuItem with TextBox possible?

15 Feb 2020, 12:08

After trying it seems like a bug of floating TextBox?

When I used TextBox in a ToolBar with "ToolBar.OverflowMode"="AsNeeded", I got the same exception in Unity when that TextBox was in overflow mode.
And TextBox seemed working well as I got that exception.
Last edited by riveranb on 26 Feb 2020, 02:25, edited 1 time in total.
 
User avatar
sfernandez
Site Admin
Posts: 1974
Joined: 22 Dec 2011, 19:20

Re: MenuItem with TextBox possible?

20 Feb 2020, 11:02

Not your fault at all, it is a bug in Noesis, I was able to reproduce it.
Could you please report it in our bugtracker?

We will fix it for the next release.
 
riveranb
Topic Author
Posts: 10
Joined: 20 Aug 2019, 05:48

Re: MenuItem with TextBox possible?

25 Feb 2020, 08:55

Not your fault at all, it is a bug in Noesis, I was able to reproduce it.
Could you please report it in our bugtracker?

We will fix it for the next release.
Thank you.
I have just issued one report.
https://www.noesisengine.com/bugs/view.php?id=1629
Hope this can help.
 
User avatar
sfernandez
Site Admin
Posts: 1974
Joined: 22 Dec 2011, 19:20

Re: MenuItem with TextBox possible?

25 Feb 2020, 13:07

Thanks for the report, we fixed that for the next release.

Who is online

Users browsing this forum: No registered users and 10 guests