Skip to main content
omar_92
Known Participant
August 27, 2015
Answered

Create a custom dialog box

  • August 27, 2015
  • 3 replies
  • 5451 views

I want to make a customized dialog box which triggers when a specific menuitem is clicked ?

Where can I design my dialog box and populate specific data into it ? Is there any guide available for creating customized dialog boxes ? I looked into the guides provided along with illustrator sdk CS6 but found nothing relevant

This topic has been closed for replies.
Correct answer A. Patterson

As of CS6, Illustrator provides no SDK for dialogs and a limited SDK for panels. In both cases, you are expected to use either a third party solution (we use Qt) or platform specific code (WIN32 or Cocoa).

3 replies

Toto RoToTO
Inspiring
August 31, 2015

You could develop an hybrid extension. (Flex for your custom dialog bow  and C++ in charge of menu items).

Quite easy to do.

Samples available in SDK.

Thomas.

Inspiring
August 27, 2015

As Mr Patterson says, the SDK does not contain any way of creating dialogs since CS5. In CS6, the recommended way to create dialogs was using flex. Flex is still supported, but the recommended method now is using Html5. You can find examples of creating these dialogs in the *UI projects in the samplecode. You can also use Qt or native code if you don't want to keep up with the ever changing "recommended" method.

A. Patterson
A. PattersonCorrect answer
Inspiring
August 27, 2015

As of CS6, Illustrator provides no SDK for dialogs and a limited SDK for panels. In both cases, you are expected to use either a third party solution (we use Qt) or platform specific code (WIN32 or Cocoa).

omar_92
omar_92Author
Known Participant
August 27, 2015

Ok so once I create my dialog box with 3rd party app how do I integrate it into my code ?

Like having an event handler for a menu item which invokes my new dialog box

A. Patterson
Inspiring
August 27, 2015

When you click on the menuitem it should cause a caller/selector combination to get sent that represents a menu click. I forget the names, but the sample code will show you. If you're using the sample project skeleton, you should have methods you can just fill in. Otherwise you can catch the caller/selector combo and cast the message to the AIMenuMessage struct (or whatever it's called) and test which menuitem handle is being clicked. If the handle is the one for which you want to show the dialog, you just show it there.