Beispiel #1
0
    /// <summary>
    ///
    /// </summary>
    /// <param name="caption"></param>
    /// <param name="index"></param>
    /// <param name="callback"></param>
    /// <returns></returns>
    public GButton AddItemAt(string caption, int index, EventCallback0 callback)
    {
        GObject obj = _list.GetFromPool(_list.defaultItem);

        _list.AddChildAt(obj, index);

        GButton item = (GButton)obj;

        item.title  = caption;
        item.data   = callback;
        item.grayed = false;
        Controller c = item.GetController("checked");

        if (c != null)
        {
            c.selectedIndex = 0;
        }

        return(item);
    }