MenuItem with TextBox possible?
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.
It works in Blend project side, which appears like this way.
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.
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.
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.
Code: Select all
<ContextMenu>
...
<MenuItem>
<MenuItem.Header>
<Border>
<TextBox Width="50" Height="20"/>
</Border>
</MenuItem.Header>
</MenuItem>
</ContextMenu>
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.
Code: Select all
[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)
Or this is not supported yet?
I am using NoesisGUI v2.2.4 now.
Re: MenuItem with TextBox possible?
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.
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.
-
sfernandez
Site Admin
- Posts: 2995
- Joined:
Re: MenuItem with TextBox possible?
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.
Could you please report it in our bugtracker?
We will fix it for the next release.
Re: MenuItem with TextBox possible?
Thank you.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.
I have just issued one report.
https://www.noesisengine.com/bugs/view.php?id=1629
Hope this can help.
-
sfernandez
Site Admin
- Posts: 2995
- Joined:
Re: MenuItem with TextBox possible?
Thanks for the report, we fixed that for the next release.
Who is online
Users browsing this forum: No registered users and 5 guests