From 948e5fa3acd19b99a9ae1d712ed13bffb18814ad Mon Sep 17 00:00:00 2001 From: neostom432 <31119276+neostom432@users.noreply.github.com> Date: Mon, 23 Dec 2019 19:16:32 +0900 Subject: [PATCH] [NUI] Fix Dropdown runtime error (#1231) Reviewed and Verified with Sample --- src/Tizen.NUI.Components/Controls/DropDown.cs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Tizen.NUI.Components/Controls/DropDown.cs b/src/Tizen.NUI.Components/Controls/DropDown.cs index d4e0b50..b25d4f3 100755 --- a/src/Tizen.NUI.Components/Controls/DropDown.cs +++ b/src/Tizen.NUI.Components/Controls/DropDown.cs @@ -120,7 +120,7 @@ namespace Tizen.NUI.Components private TextLabel buttonText = null; private ImageView listBackgroundImage = null; // Component that scrolls the child added to it. - private Scrollable scrollable = null; + private ScrollableBase scrollableBase = null; // The LinearLayout container to house the items in the drop down list. private View dropDownMenuFullList = null; @@ -351,7 +351,7 @@ namespace Tizen.NUI.Components [EditorBrowsable(EditorBrowsableState.Never)] public void AttachScrollBar(ScrollBar scrollBar) { - if (scrollable == null) + if (scrollableBase == null) { return; } @@ -366,7 +366,7 @@ namespace Tizen.NUI.Components [EditorBrowsable(EditorBrowsableState.Never)] public void DetachScrollBar() { - if (scrollable == null) + if (scrollableBase == null) { return; } @@ -387,7 +387,7 @@ namespace Tizen.NUI.Components CreateButton(); CreateListBackgroundImage(); - if (null == scrollable) // scrollable used to test of ListContainer Setup invoked already + if (null == scrollableBase) // scrollableBase used to test of ListContainer Setup invoked already { SetUpListContainer(); } @@ -406,11 +406,11 @@ namespace Tizen.NUI.Components [EditorBrowsable(EditorBrowsableState.Never)] protected void UpdateDropDown() { - if (null == scrollable || null == listBackgroundImage || null == dropDownMenuFullList) return; + if (null == scrollableBase || null == listBackgroundImage || null == dropDownMenuFullList) return; if (null == Style.ListBackgroundImage.Size) return; // Resize and position scrolling list within the drop down list container. Can be used to position list in relation to the background image. - scrollable.Size = Style.ListBackgroundImage.Size - new Size((listPadding.Start + listPadding.End), (listPadding.Top + listPadding.Bottom), 0); - scrollable.Position2D = new Position2D(listPadding.Start, listPadding.Top); + scrollableBase.Size = Style.ListBackgroundImage.Size - new Size((listPadding.Start + listPadding.End), (listPadding.Top + listPadding.Bottom), 0); + scrollableBase.Position2D = new Position2D(listPadding.Start, listPadding.Top); int listBackgroundImageX = 0; int listBackgroundImageY = 0; @@ -474,7 +474,7 @@ namespace Tizen.NUI.Components Utility.Dispose(headerText); Utility.Dispose(buttonText); Utility.Dispose(button); - Utility.Dispose(scrollable); + Utility.Dispose(scrollableBase); Utility.Dispose(dropDownMenuFullList); Utility.Dispose(listBackgroundImage); } @@ -594,13 +594,13 @@ namespace Tizen.NUI.Components Focusable = true, }; - scrollable = new Scrollable() + scrollableBase = new ScrollableBase() { Name = "Scrollable", }; - scrollable.Add(dropDownMenuFullList); + scrollableBase.Add(dropDownMenuFullList); - listBackgroundImage.Add(scrollable); + listBackgroundImage.Add(scrollableBase); listBackgroundImage.Hide(); } -- 2.7.4