Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hiding Seperator Bars when Surrounding Bars not
Message
 
À
21/03/2003 15:21:39
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00767824
Message ID:
00770200
Vues:
23
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform