Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening Menu bars

Status
Not open for further replies.

CleoMan

Programmer
Jun 18, 2003
110
ZA
Lets say I have 2 menu bars that are already created.
Now I want to call menu1 to display. Then at a later stage I want tom remove menu1 and display menu2.

I have searched the help files but is unable to find any code that can help me.

Please , please help...

 
CleoMan,

This should be a simple task, call menu1.show() to display the first menu then call menu2.show() to display the second menu. menu2 should replace menu1. You may need to use menu.empty() if you are using a global variable for both menus. What specific problem are you having?

Perrin
 
You see I dont know if I can attach these premade menu bars to a menu variable (to my knowledge I cant).

Let's say my menu1 = appmenu and menu2 = blankmenu.

Do I just say appmenu.show?

I know this is not the hardest question, but I just can't get the thing working!
 
Don't know if you already have found a solution.
Can't quite follow you on those "premade menu bars" though, how/where did you make them?

When I build menu's I distinguish between a "file"-menu and a "button"-menu.

The "file"-menu is fairly simple to make as described above.

You can build a "button"-menu on a form.
In the open method of the form you have to remember to check if the form is already open and set the absolute position of the form.
I normaly take care that a toolbar is active and place my menu on top of it.
You set the timervalue in the open method of the formpage and place something like this in the timer method.
Code:
enumFormNames(openForms)
if openForms.size() = 1 then
	message("Closing toolbar, no forms open!")
	sleep(200)
	close()
else
	if openForms[1] = "mymenubar" then
		callingForm.attach(openForms[2])
		callingForm.bringToTop()
	else
		callingForm.attach(openForms[1])
	endif
endif

But then again maybe this is not what you are looking for!!!

Regards
Kim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top