Jump to content

Open a dialog when loading a file


guix
 Share

Recommended Posts

Hello,

 

I have an issue with a filetype plugin I am writing. I need to show a dialog with 2 textboxes when opening the file, and I will enter the size of the image in those textbox, because the size can't be found in the file (only raw pixel data).

 

How could I do that ?

Edited by guix
Link to comment
Share on other sites

Sorry there is no interface to do this.

 

You may create your own dialog but there are several issues to solve:

- you should execute the dialog in the Ui task which is a bit tricky

- the dialog should show the PDN glass look (if switched on) and follow the IndirectUi layout

- center the dialog on the main form and use the main form as owner

- the dialog should support PDN 3.5 and 4

 

There is one issue you can't solve w/o doing dirty things: Canceling the dialog (or the save method) will raise an exception.

 

One example is the ImSVG FileType plugin.

midoras signature.gif

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...