2

In all the examples I've seen it's just one element per line. I would like to place 2 or more edit boxes next to each other to conserve vertical space. Has anyone run across sample showing how this is done?

poupou
  • 43,413
  • 6
  • 77
  • 174
user1229084
  • 103
  • 1
  • 5

1 Answers1

3

That's not common in most application (due to limited screen size) but you should be able to do something like this using the UIViewElement. E.g.

Define your own UIView type (e.g. MyView) that contains the two (or more) UI elements you want (e.g. two UITextView).

// incomplete example
class MyView : UIView {

   public UIView (string first, string second)
   {
       tv1 = new UITextView (new RectangleF (...)) { Text = first; }
       tv2 = new UITextView (new RectangleF (...)) { Text = second; }
   }

   // ...
}

Next create the UIViewElement and add them to your DialogViewController.

new UIViewElement ("caption", new MyView ("a", "b"), false);
miguel.de.icaza
  • 32,654
  • 6
  • 58
  • 76
poupou
  • 43,413
  • 6
  • 77
  • 174
  • Thanks for the suggestion. I've decided to use separate lines for each Entry Element, but I'm sure I can use this technique later. Thanks for the reply. – user1229084 Mar 11 '12 at 14:37