ScriptGUI.GUI.UIListBox.SetListChangeScroll C# (CSharp) Method

SetListChangeScroll() public static method

设置列表控件滚动事件操作
public static SetListChangeScroll ( ScriptGUI.FString layout_name, ScriptGUI.FString widget_name, Event func, EventControl control ) : ExecuteResult
layout_name ScriptGUI.FString 面板名称
widget_name ScriptGUI.FString 控件名称
func Event 事件操作代理
control EventControl 事件控制方式
return ExecuteResult
            public static ExecuteResult SetListChangeScroll(FString layout_name, FString widget_name, Event.SenderInt func, EventControl control)
            {
                ListBox lb = null;
                ExecuteResult ret = FindUI(layout_name, widget_name, out lb);
                if (ExecuteResult.Success == ret)
                {

                    switch (control)
                    {
                        case EventControl.Add:
                            {
                                lb.EventListChangeScroll += func;
                            }
                            break;
                        case EventControl.Remove:
                            {
                                lb.EventListChangeScroll -= func;
                            }
                            break;
                    }
                }
                return ret;
            }