Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hiding Seperator Bars when Surrounding Bars not
Message
 
To
21/03/2003 15:21:39
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00767824
Message ID:
00770200
Views:
21
Gary and Paul,

Sorry, my mistake! I looked into this a little further and realized Show is not firing for menu bars because your app isn't set up to be multi-lingual.

Here's an alternate solution that should work for both multi-lingual and single-lingual (sorry, couldn't resist <s>) applications.

1. Remove all code I previously posted from CSeparatorBar.Show()

2. Add the following code to CSeparatorBar.Init():
LPARAMETERS tnBarNumber, tcPopupName

LOCAL llReleaseBar, loPrevBar

IF NOT DODEFAULT(tnBarNumber, tcPopupName)
	RETURN .F.
ENDIF

*--- If the bar is first in the list, release it
IF this.nbarnumber = 1
	llReleaseBar = .T.
ELSE
	*--- If the previous bar is a separator, release it
	loPrevBar = this.Parent.Get(this.nbarnumber-1)
	IF LOWER(loPrevBar.Class) = "cseparatorbar"
		llReleaseBar = .T.
	ENDIF
ENDIF

IF llReleaseBar
	this.Release()
ENDIF
Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Reply
Map
View

Click here to load this message in the networking platform