Creating custom dialogs.

About Monkey 2 Forums Monkey 2 Programming Help Creating custom dialogs.

Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by  TurkeyLurker 1 year, 6 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #10959

    TurkeyLurker
    Participant

    I’m currently working on a project to develop a gui application but I can’t figure out modal dialogs. I get as far as actually running a custom dialog, but after searching through ted2 source I simply don’t quite get how to customize a dialog. Here is my basic code:

    [/crayon]
    #10967

    Mark Sibly
    Keymaster

    Dialogs have a ContentView property which is where you put the ‘contents’ of the dialog (which is often itself a DockingView that contains other views, or a list view etc) and you can use Dialog.AddAction to add “Okay”,”Cancel” etc buttons/actions.

    Open() and Close() are used to show/hide the dialog, and you can use fibers to ‘block’ until the dialog has closed (although you don’t have to).

    Here’s a minimal example:

    #10970

    TurkeyLurker
    Participant

    Thanks Mark! This puts me on the right path.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.