MDI Child Form Load - winforms

Loading multiple child forms from a loop into a MDI parent form. They are displayed one at a time. I would like to display all the created forms at once. I tried only using the .Show() method after they are all created, but they still only display one at a time.

Perhaps layouting your children forms using the MdiLayout Enumeration.

Related

Collecting state from multiple child tabs

Let's say we want to create a new Task. We have 2 categories of information we want to collect from the user for creating a new Task: general params, action params.
To make it easily separated we are separating between them with tabs. so each gets its own react component, both stored in different react-tabs tabs.
In the parent component I have a save button and I want that at any given time, the user could click it to send the entire state from both the tabs' state to the server.
While I could forward event handlers from the parent to the children (as suggested by other questions on this topic)... doing it for each of the 20 controls (dropdowns, textfields, date time pickers) in each of them requires a lot of boilerplate code and seems unreasonable.
I'm looking for a best practice for this situation. Thanks!

Codename One: constraints (West, center...) not visible in new GUI Builder

The window where the constraints of the Border Layout should show, is empty? Note: of course my Form is selected before I switched to the Layout panel.
->
You need to select the child component that you want centered not the parent container.
I think this will become more intuitive when we split the tree out of the tabs UI so you can always see it like we could in the old GUI builder. Ideally we should also be able to drag into the tree like we could back then.

How to change the ribbon groups dynamically based on the mdi child form?

I have a base form with devexpress ribbon control and an xtratabbedmdimanager with one datagridview in one of the tabs. Double-clicking the datagrid row, opens new tab form.
Is it possible when opening the new mdi child form to change the ribbon groups? Hide one ribbon group and appear a new one based on the mdi child form in the tab?
Thank you in advance!
This should be happening automatically if you are assigning the ribbon groups to the child form and not the parent. Ribbon groups from the parent should show all of the time, and when you switch from one child form to the other, only the ribbon items for that child form should show along side the parent groups.
To enable this behavior, if it's not already done so, set the MdiMergeStyle property of the ribbon on the parent form to Always.

imagelist images not available in child form .net winform

I have a dll that contains a form that is being inherited by other forms. The parent form has an imagelist with several images in it and two of these are being used in toolbar buttons. It has been working for a long time but I had to add a toolbar button and an image to go with it.
The new button with the new image displays in the designer correctly in the base form, but in an existing child form, the button doesn't display in the toolbar in the designer (although it shows up at runtime with no image). In the child form, the imagelist is present with all the original images, but the new image that I added to the base form does not appear in it.
I have tried several different icons with the same result. Interestingly when I point the new tb button to one of the images that has always existed, everything is fine in the child. It just won't handle any of the new images (I've tried icons & bitmaps). I would try to delete the toolbar and imagelist and re-create it but unfortunately I don't know where the existing images are located to be able to add them back to the new imagelist.
(VS 2010, VB.NET - but C# answers are most welcome!)
I have the same problem. My parent form have an image list wich I use to present my own control box (min, max, close). All the child forms inherit from this form and everything is ok if I don't change the elements of the list. But when I add an element or change the Image index of the control buttons, this is not reflected in the child forms. Sadly I haven't fixed it yet but what I did is:
Declare the Image list as public in the designer of the parent form
Determine the forms that don't reflect the desired change
Set Manually the desired change by adding the image to the inherited IMageLIst and changing the image index in all and every form with the bug
This is not what I intended to do by designing a parent form, but it works.

Architecturing a React application

I have a question regarding the architecture of an React application.
The application consists from main widget and a few other child widgets. Each of them may have other child widgets too. The widgets don't know what do they do, neither how many they are (they are provided by the user).
Here is an example:
In the picture below there are initially two widgets, each of them have several child widgets.
On step #1 the two widgets are visible and they have a few child widgets too.
On step #2 the user clicked somewhere on the page. Because of that, another child widget appeared in the first widget.
On step #3, user clicked in some of the child widgets in widget 2. In this case, only this widget should appear. The others in widget 2 should disappear.
On step #4 clicking on a child widget in widget 2 should cause that widget 1 will disappear entirely.
The question is - how do we manage this situation? I imagine clicking on child widget or somewhere on the page should notify the root so it will add a new widget or skip rendering of the other ones. However, I can't really imagine what to put in the state and how exactly to achieve this.
So, here is how we did it in the end of the ends:
We invented so called "exclusive mode" of an widget. The parent component passes a callback function via properties. Then, a child widget may request to be rendered in "exclusive mode".
When rendering in exclusive more is being requested, the parent renders only those widget, which key matches with the key of the widget, requested exclusive access.
In this way, only one Toolbar may be rendered or only some button may be rendered in given Toolbar.

Resources