Personally, I'm creating an application with NavigationController.
In a second form, but I have a UIPickewView control simply does not load.
I've tried various ways including giving a new controle.Ai not from this
error, but neither carries nor appears in view. How do I apply this item
since this one is called from another form? Some could help me.

Observação.Meu English is bad, I am Brazilian.

I'll post the code

namespace Tables05
{
        public partial class AlimentosDetalhe : UITableViewController 
        {
                
                //this.ListBox.Model = new ListBoxModel (this);
                //ListBox.ShowSelectionIndicator = true;
                #region Constructors

                // The IntPtr and initWithCoder constructors are required for 
items that
need 
                // to be able to be created from a xib rather than from managed 
code

                public AlimentosDetalhe (IntPtr handle) : base(handle)
                {
                        Initialize ();
                }
                
                [Export("initWithCoder:")]
                public AlimentosDetalhe (NSCoder coder) : base(coder)
                {
                        Initialize ();
                }

                public AlimentosDetalhe () : base("AlimentosDetalhe", null)
                {
                        Initialize ();
                    //RectangleF f = new RectangleF(100,50,50,100);
                        //this.ListBox = new UIPickerView(f);
                        this.ListBox.Model = new ListBoxModel(this);
                        this.ListBox.ShowSelectionIndicator = true;
                }

                void Initialize ()
                {
                        //ListBox = new UIPickerView();
                        //ListBox.Model = new ListBoxModel (this);
                        //ListBox.ShowSelectionIndicator = true;
                        //window.MakeKeyAndVisible ();
                        //return true;
                }
                
                class ListBoxModel : UIPickerViewModel 
                {
                        AlimentosDetalhe app;
                        List<string> data;
                        public ListBoxModel (AlimentosDetalhe controller)
                        {
                                app = controller;
                                data = new List<string>{"Colher","Colher Sopa"};
                        }
                        public override int GetComponentCount (UIPickerView 
picker)
                        {
                                return 1;
                        }
                        public override int GetRowsInComponent (UIPickerView 
picker, int
component)
                        {
                                return data.Count;
                        }
                        public override string GetTitle (UIPickerView picker, 
int row, int
component)
                        {
                                return data[row];
                        }
                        public override void Selected (UIPickerView picker, int 
row, int
component)
                        {
                                //app.DisplayText.Text = "You selected " + 
data[row];
                                string teste = data[row].ToString();
                        }
                }
                
                #endregion
        }

--
View this message in context: 
http://monotouch.2284126.n4.nabble.com/UIPickerView-Help-tp3725612p3725612.html
Sent from the MonoTouch mailing list archive at Nabble.com.
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to