+ Reply to Thread
Results 1 to 3 of 3

Thread: Newb: How to make a dialog modal?

  1. #1
    Soulwalker
    Join Date
    Nov 2013
    Posts
    2

    Default Newb: How to make a dialog modal?

    New coder question incoming! What's the best way to keep the calling code waiting while a dialog is open?

    (Pseudocode)

    Code:
    local new_profile_name = Dialog_Box_Get_Profile_Name()
    new_profile = build_new_profile(new_profile_name)
    Can't do anything until that dialog is completed and really don't want to stick all the code to build a new profile inside an "OK" button handler. Though I suppose that would work.

  2. #2
    Champion
    Join Date
    Jun 2011
    Posts
    561

    Default

    Put the Code into a function and call that function from a button within the dialog. Pass any needed Info as parameters to the function.

    Cheers
    N.

  3. #3
    Soulwalker
    Join Date
    Nov 2013
    Posts
    2

    Default

    Oh, makes sense. Thanks!

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts