Common Dialog

This forum is currently in read-only mode.
  • I am having trouble assigning the file/path refrence to a text box using the common dialog object.

    I make a Edit box, one button called BROWSE, and a common dialog.

    When I press browse, the common dialog shows the FOLDER selector which is fine. When I press OK, it will not transfer the folder name and path into the edit box.

    My code is something like:

    Folder Dialog OK

    -Edit box text = dialog.folder

    Nothing happens D:

    Please halp!

    ~Sol

  • I think the "Folder Dialog: OK" is broken. Just do this:

    +On Button Clicked

    -CommonDialog: Show folder selector

    -Set edit box to CommonDialog.Folder

    The Common Dialog object pauses everything while something is up, so just put the set edit box action right after the show folder selector in the same event. Hope that helps.

  • I think the "Folder Dialog: OK" is broken. Just do this:

    +On Button Clicked

    -CommonDialog: Show folder selector

    -Set edit box to CommonDialog.Folder

    The Common Dialog object pauses everything while something is up, so just put the set edit box action right after the show folder selector in the same event. Hope that helps.

    Cheers link, I'll give it a shot as soon as I get home. I'll let you know how it goes down. Thanks for the reply mate.

    ~Sol

  • I think the "Folder Dialog: OK" is broken. Just do this:

    +On Button Clicked

    -CommonDialog: Show folder selector

    -Set edit box to CommonDialog.Folder

    The Common Dialog object pauses everything while something is up, so just put the set edit box action right after the show folder selector in the same event. Hope that helps.

    The on ok is broken...

    You can make it all part of the same event

    On button click

    -Show open dialog

    -set edit box to common dialog.First selected file

    but be warned that if you exit the Dialog it may cause a crash I know it does in my level editor.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Ah, folder selector's fixed.

    Why wouldn't you use the On OK for the file dialog.. though? It's there for safety, so your events know a file was picked.

  • ..could you post a file replicating the crash, though?

  • Ah OK, well if it's fixed then I'll just wait for the next update and leave my events the way they are... I didn't get a chance to mess with it last night as planned since I had to go get my suit refitted for my friends wedding and didn't end up getting home late.

    ~Sol

  • Why wouldn't you use the On OK for the file dialog.. though? It's there for safety, so your events know a file was picked.

    The on ok caused a crash every time i used it...

  • I'd suggest this was your code as it seems very unlikely a triggered condition could cause a crash.. could you paste an image of the events for the condition?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)