Dynamic form creation c#.net mobile application

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • libish
    New Member
    • Oct 2008
    • 42

    Dynamic form creation c#.net mobile application

    hi all,
    can any one help me to create dynamic forms in windows mobile application.

    here in my application, i'm requesting a server response, and the server response contains directions for the GUI's . here i need to add forms, and within that form i need to add menus, labels, list etc... according to the response.

    can any one help me to get this done...
  • markmcgookin
    Recognized Expert Contributor
    • Dec 2006
    • 648

    #2
    Originally posted by libish
    hi all,
    can any one help me to create dynamic forms in windows mobile application.

    here in my application, i'm requesting a server response, and the server response contains directions for the GUI's . here i need to add forms, and within that form i need to add menus, labels, list etc... according to the response.

    can any one help me to get this done...
    The problem here is adding the event handlers for buttons, as you can't assign that at runtime. What you could do is create all the buttons/functions that you need and then show/hide them dependant on your server response?

    Code:
    pseudo-code:
    
    if (response == serverResponse.TypeA)
    {
        myFirstButton.visible = true;;
        myMenu.Items.Add(MenuItem1);
    }
    else if (response == serverResponse.TypeB)
    {
        myOtherButton.visible = true;
        myMenu.Items.Add(MenuItem2);
    }
    Or something along those lines?

    Comment

    • libish
      New Member
      • Oct 2008
      • 42

      #3
      thank you so much for that reply...

      Comment

      Working...