This is a migrated thread and some comments may be shown as answers.

RadMenu MdiList

13 Answers 139 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 18 Nov 2010, 04:22 PM
Hi

I have a shaped form and set a menu item called 'Window' with .MDIList property = TRUE so that it shows a list of all child forms currently open within the MDI.

However, the menu is showing the form Name e.g. "frmPerson" and not the text in the forms Title bar so if we have multiple instance of "frmPerson" open within the MDI it shows "frmPerson" multiple times in the menu and not what is contained in the forms title bar which identifies the individual forms e.g "Person - Joe Bloggs"

The forms .Text name property is set to the details I would expect to see in the MDIList under Window but it appears to use the .Text value that is set on the form at design time?

Any idea how I can change this?

Many Thanks
Steve

13 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 18 Nov 2010, 05:20 PM
Hello Steve,

What version of the controls are you running? I've just tried this on the latest Q3 version and it showed the Form's text property in the menu (as per this link)

Regards,

Richard
0
Steve
Top achievements
Rank 1
answered on 18 Nov 2010, 07:34 PM
Thanks Richard

Can't check right now but I think it might be 2009 Q2 version but will confirm.

Did it show the Text peoperty of the form if it had been changed before showing the form or did it show the text property set at design time? As this is the problem I have, it always shows the design time form text and not what it was changed to before showing the form.

Many Thanks
Steve
0
Richard Slade
Top achievements
Rank 2
answered on 18 Nov 2010, 07:45 PM
Hi,

There are many enhancements and changes in the new version and I'd have a look at upgrading. You could download the trial and try upgrading your project. the trial is available here.

The MDIList showed in the menu the text of the forms that I had as MDI Children, not the form name.
Hope that helps
Richard
0
Steve
Top achievements
Rank 1
answered on 19 Nov 2010, 12:18 AM
Thanks, will look at upgrading or trying the demo version although I really don't want to upgrade the whole project unless we have to atm as it's huge!

The version we have seems to just put whatever is in the Form.Text property (e.g "Person Form") at design time into the mdi list and not what the Form.Text property is set to at runtime with something like Me.Text = "Joe Blogs" and another instance with say Me.Text = "John Smith" before the .Show is called.

The mdilist would show "Person Form" twice instead of "Joe Bloggs" and "John Smith"

So had you changed the .Text property in code before showing the form and the menu listed the changed text that appears in the forms title bar?

Thanks again
Steve
0
Richard Slade
Top achievements
Rank 2
answered on 19 Nov 2010, 12:23 AM
Hi Steve,

I only tried setting the text in the designer and running it which showed correctly, but I'll try that out for you first thing in the morning and let you know the result, or if it needs one a workaround if I can find one for you.

Best regards,
Richard
0
Richard Slade
Top achievements
Rank 2
answered on 19 Nov 2010, 08:42 AM
Hi Steve,

Here is what I did. I added a form that was the MDI Child, and in the designer I gave it a text of "Design time". I then changed the text in the form load event to "Changed" and this is the text that I saw in the MDI List menu. I also changed the text to "Changed" in the FormShown event of the MDI Child and it worked correctly there too.

I hope this helps
Richard
0
Steve
Top achievements
Rank 1
answered on 19 Nov 2010, 10:15 AM
Hi Richard

Many thanks, exactly what I needed to know, looks like we might have to upgrade!

Much apprieciated!

Cheers
Steve
0
Richard Slade
Top achievements
Rank 2
answered on 19 Nov 2010, 10:17 AM
No problem. May I ask you to mark any suggestions that you found helpful as answer so others can find the solution too.

Many thanks
Richard
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 19 Nov 2010, 11:14 AM
Hi again Steve,

I just thought I'd add a screenshot and show the code so you knw for sure this is working in Q3 the way you want.

Main Form
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim form1 As New RadForm1()
    form1.MdiParent = Me
    form1.Show()
    Dim form2 As New RadForm2()
    form2.MdiParent = Me
    form2.Show()
End Sub

RadForm 2 Shown (MDI Child)
Private Sub RadForm2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Me.Text = "Another Form"
End Sub

RadForm1 Shown (MDI Child)
Private Sub RadForm1_Shown(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Shown
    Me.Text = "Some Name"
End Sub

See screenshot

Best regards,
Richard
0
Steve
Top achievements
Rank 1
answered on 19 Nov 2010, 05:59 PM
Superb Richard!

Thats exactly what I needed.  I'm going to try the code as you have it in my version to prove that it isn't something else going on in the way we open the forms etc and take it from there.

Many Thanks again
Steve
0
Richard Slade
Top achievements
Rank 2
answered on 19 Nov 2010, 06:02 PM
Glad that was useful. Please remember to mark as answer.
Let me know if there's anything else you need.
Thanks
Richard
0
Steve
Top achievements
Rank 1
answered on 22 Nov 2010, 06:43 PM
Hi Richard

It all seems to work for our project on a demo of the latest version as you suggested however that has flagged up some other seperate issues.

I tried your simple example on our current version and that too did not work and showed the design time form.Text value

We have decided for the time being to implement our own 'Window' menu functionality but thanks for all your input as it has allowed us to decide which route to take at the moment.

Many Thanks
Steve
0
Richard Slade
Top achievements
Rank 2
answered on 22 Nov 2010, 08:36 PM
Hi Steve,

I'm glad that the example I gave has worked on the latest version, but sorry to hear that there are some other issues that you have with the latest version.

I know that there will soon be a service pack released for the Q3 edition, and there is already an internal build that has fixed some issues that were flagged as high priority in the Q3 release.

If there's something I can do to help you with these Q3 issues that you have, then let me know, or open a new post in the appropriate area. The forums are pretty well covered and you should get a fairly quick response.

Hope that helps
Richard
Tags
Menu
Asked by
Steve
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Steve
Top achievements
Rank 1
Share this question
or