473,386 Members | 1,702 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

ToolStripManager.Merge and .RevertMerge help please

Newbie alert!

VB 2005 Express. One MDIParent form and one regular Form. The MDIParent has
the standard ToolStrip. The MDI Child Form has its own ToolStrip that is to
be merged onto the MDIParent's ToolStrip. Sounds simple, right?

I've gone through quite a few URLs that all pretty much say the same thing
but I have yet to get this completely working. (Most of those URLs also seem
to wander away from ToolStrip and instead go down the same illustration path
using MenuStrip. My problem is with ToolStrips, not MenuStrips.)

No problem with ToolStripManager.Merge(sourceToolStrip, targetToolStrip),
other than the fact that no matter what I do with the ToolStripButton
MergeAction and MergeIndex I can't seem to get the buttons to merge in the
middle of the target.

Calling ToolStripManager.RevertMerge(sourceToolStrip, targetToolStrip), on
the other hand, appears to have no effect.

In the MDI Child, the ToolStrip's AllowMerge and AllowItemReorder are set to
True. The individual ToolStripButtons are all set to Insert (or Append -
I've tried it both ways) with unique MergeIndex values (let's say they're
values from 51-55).

The MDI Child's New() subroutine simply calls:

ToolStripManager.Merge(Me.ToolStrip, MyParent.ToolStrip)

No problems there (other than the merged button order that is - they always
get tacked on the end of the target).

The MDI Child's FormClosing() subroutine equally simply calls:

ToolStripManager.RevertMerge(Me.ToolStrip, MyParent.ToolStrip)

Unfortunately the merged result is still displayed.

In the MDIParent, the ToolStrip's AllowMerge and AllowItemReorder properties
are also set to True. The individual ToolStripButtons are mostly default
(Append, -1) except for the last separator and Help buttons that have a
MergeIndex of 98 and 99 respectively.

The big question is how does one get merged ToolStrips unmerged?

The bonus question is how does one get ToolStripButtons to merge in the
middle of the target?

Jul 17 '06 #1
1 4934

"MyndPhlyp" <no****@homeright.nowwrote in message
news:OG**************@TK2MSFTNGP05.phx.gbl...
>
The MDI Child's FormClosing() subroutine equally simply calls:

ToolStripManager.RevertMerge(Me.ToolStrip, MyParent.ToolStrip)
Doh! Finally figured that one out. Had to reverse the order of the
ToolStrips in the parameter list.

Still trying to figure out how to get the ToolStripButtons of the source to
merge in the middle of the target though.
Jul 17 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Newbie | last post by:
Hi, I am trying to merge data from two tables (over two servers, using dblink). Approx 40,000 records in each. Server1(source) and Server2(dest) On Server1, db-link "dblink1" points to...
4
by: Steve Donnor | last post by:
Here's my question.. I have a Dataset which has populated a datagrid with information from an AS400 That SQL looks like this "Select MASYS, MAFLD, MADATA, MAEQV from QS36F.MAPDATA WHERE MASYS =...
9
by: Neil Ginsberg | last post by:
I have a strange situation using Access to automate a Word mail merge. Using Access 2000 and Word 2000, the code opens Word, opens the document in Word, sets a table in the calling Access...
8
by: Ron B | last post by:
Help!!! What am I doing wrong? I am working with Office 2003 and am trying to create a command button on an Access form that will create a mail merge in Word from an Access table. I want to...
3
by: Matt F | last post by:
I'm having difficulty with a function and can't find what the problem is. The code is below. Essentially, it works fine if the target table (tbl variable in code) is empty, however if it contains...
1
by: mr k | last post by:
Hi, I wanted to use mail merge with forms but Text form fields are not retained during mail merge in Word, I got the code from Microsoft but it doesn't remember the text form field options such as...
16
by: Sam Durai | last post by:
Hello, I need to merge a small table (of rows less than 100,sometimes even 0 rows) to a big table (of rows around 4 billion). I used the PK of the big table as merge key but merge does a table scan...
1
by: Esther Lane | last post by:
Hello! First off, many many thanks to Albert who wrote the Mail Merge code for MS Access I am using. It has been working beautifully for a few years. However, my client just (without notice!)...
2
by: mqueene7 | last post by:
below is my code for my merge sort but I can't get it to sort properly. I am trying generate random numbers based on input from the user and then sort those random numbers. Can you tell me what I...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.