Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
IManFileOpenDlg/Cmd
nthomas
I want to display a dialog (similar to the Open dialog) that users can select multiple documents and pass it back to my code.
Is the IManFileOpenCmd the right object to use? If it is, I am unable to make multi-selection work even though my code has contextItems.Add("IManExt2.MultipleSelection", true); set.
I also can't change the title on the dialog to something else other than "Open -[\Document Worklist]". I have tried dialog.title = "My Dialog Test"
I tried IManFileOpenDlg as well but can't set the correct value for dialog.sessions. I have tried assigning it the iManSession.
Is IManFileOpenCmd the right object to use? Would the IManFileOpenDlg be better or is there something else?
thanks in advance
ngaire
Find more posts tagged with
Comments
jny
You can set the MuliSelection Property off of the IManFileSaveDlg Object instead of adding a contextitem to the command. What you need to set up a sink to the IManFileSaveCmd_OnInitDialg EventHandler in order to catch the OnInitDialog Event to set the property.
[C#]
// IManFileOpenCmd event delegate variable
IMANEXT2Lib._ICommandEvents_OnInitDialogEventHandler del_OnInit;
// Wrapper handler to the IManFileOpenCmd.OnInit event handler
private void OnInit (object dlg)
{
// Get dialog
IManFileOpenDlg fo = (IManFileOpenDlg) dlg;
// Set multi selection
fo.MultiSelection = true;
}
private void Main() // Somewhere in your main function.
{
...
// Create an instance of the IManFileOpenCmd Object
IManFileOpenCmd oFileOpenCmd = new IManFileOpenCmdClass();
// Add an event handler for the OnInitDialog Event of the IManFileOpenCmd object.
del_OnInit = new IMANEXT2Lib._ICommandEvents_OnInitDialogEventHandler(OnInit);
oFileOpenCmd.OnInitDialog += del_OnInit;
...
}
[VB6]
Option Explicit
' WithEvents variable to IManFileOpenCmd Object event handler
Private WithEvents oFileOpenCmd As IManFileOpenCmd
Private Sub Main() ' Somewhere in your main function
...
Set oFileOpenCmd = New IManFileOpenCmd
...
End Sub
Private Sub oFileOpenCmd_OnInitDialog(ByVal pMyInterface As Object)
' Set multi selection
pMyInterface.MultiSelection = True
End Sub
nthomas
Thank you very much for fixing my problem!