Launching my own form from menu  Topic is solved

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

Launching my own form from menu

Postby DannyC » Tue Apr 15, 2025 1:33 pm

Sort of related to thread viewtopic.php?f=26&t=2492 but a different tangent, so appropriate for a new thread.

In the above question, I was firing the custom form from a ribbon button which works nicely.

If I want to launch it from a menu, say under Debtors, Utilites how can I do that?
I know about adding it to the Forms, then adding it to the menu but my question is...

Using the sample plugin Launch App which launches Notepad, I can see the partial class inheriting the sales order Process screen. But it doesn't actually open the Process screen - it launches Notepad. Got it & have found that if I disable the public override code, the Process window displays but is blank.
All good there.

How can I populate the Process window with my own controls, say text boxes, labels, buttons etc?
Should I use Infragistics controls instead?

I've done the attached plugin based off Launch App and I am trying to populate the Process window with my controls.
And I also want to know how to fire some code when the user clicks the Process button.
Attachments
Plugin Attkey My Custom Launch.xml
(26.19 KiB) Downloaded 414 times
User avatar
DannyC
Senpai
Senpai
 
Posts: 718
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 31

Re: Launching my own form from menu  Topic is solved

Postby Mike.Sheen » Tue Apr 15, 2025 1:36 pm

Take a look in demo data at the plugin Debtor Export to CSV - it creates a form which is launchable from the menu.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: Launching my own form from menu

Postby SBarnes » Tue Apr 15, 2025 2:20 pm

The fundamental issue is there is no code in the plugin adding the controls to the control collection of any of controls Client Area on the form such as the code below, I've given him an example off line of the designer and class files with a couple of controls dropped on a ProcessAction form that I created in visual studio and some explanation that hopefully is enough to get him started.

Code: Select all
            this.upMain = new Infragistics.Win.Misc.UltraPanel();
            this.ultraTextEditor1 = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
            this.ultraButton1 = new Infragistics.Win.Misc.UltraButton();
            this.ultraButton2 = new Infragistics.Win.Misc.UltraButton();
            this.ultraLabel1 = new Infragistics.Win.Misc.UltraLabel();

            this.UserInterface_Fill_Panel.ClientArea.Controls.Add(this.upMain);
            this.upMain.ClientArea.Controls.Add(this.ultraLabel1);
            this.upMain.ClientArea.Controls.Add(this.ultraButton2);
            this.upMain.ClientArea.Controls.Add(this.ultraButton1);
            this.upMain.ClientArea.Controls.Add(this.ultraTextEditor1);
            this.upMain.Dock = System.Windows.Forms.DockStyle.Fill;
            this.upMain.Location = new System.Drawing.Point(0, 0);
            this.upMain.Name = "upMain";
            this.upMain.Size = new System.Drawing.Size(592, 358);
            this.upMain.TabIndex = 1;

Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1696
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 191

Re: Launching my own form from menu

Postby DannyC » Tue Apr 15, 2025 6:14 pm

With information gleaned from the Debtor Export to CSV plugin, and the code that Stuart presented (outside this forum thread) I've been able to knock up a very simple example which I think I should be able to expand on.

It displays a label, a text box which I am populating from one of the buttons.
I've also worked out how to fire some code off the Process button - albeit just a simple messagebox.

If anyone cares to peruse and critique, plugin attached.
Attachments
Plugin Attkey My Custom Launch.xml
(32.65 KiB) Downloaded 405 times
User avatar
DannyC
Senpai
Senpai
 
Posts: 718
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 31


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 4 guests