Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GotFocus like event for bars in a sysmenu popup?
Message
From
22/02/2002 04:10:30
 
 
To
22/02/2002 03:42:10
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Miscellaneous
Thread ID:
00623560
Message ID:
00623589
Views:
9
even better
*--------------------------------------------------------------------------
procedure do_it()

	local i, p
	private MenuItem && not needed really, but shows possibilities
	MenuItem = ''
	
	p = sys(2015)
	define popup (p) shortcut
	for i = 1 to 10
		define bar cntbar(p)+1 of (p) prompt str(i)
		on bar cntbar(p) of (p) x=ShowIt(p, bar())
	endfor
	
	activate popup (p)
	if( !empty(bar()) )	&& not escaped
		?'MenuItem=', MenuItem
	endif
	release popup (p)
	
endproc
*--------------------------------------------------------------------------
function	ShowIt(p, i)
	set message to prmbar(p, i)
	MenuItem = p + str(i,4)
endfunc
*--------------------------------------------------------------------------
>Malcolm,
>
>maybe this can help a bit
>
>
>procedure do_it()
>
>	p = sys(2015)
>	define popup (p) shortcut
>	for i = 1 to 10
>		define bar cntbar(p)+1 of (p) prompt str(i)
>		on bar cntbar(p) of (p) wait window nowait prmbar(p, bar())
>	endfor
>	
>	activate popup (p)
>	release popup (p)
>	
>endproc
>
>
>>Hi,
>>
>>When a user is navigating an application's menu, is there a way for our application to trap what menu (popup) bar they have highlighted so we can dynamically display information about the menu (popup) bar in our application specific 'status bar' area?
>>
>>I was hoping there might be some trick that would give us a Got/LostFocus type of functionality. However, after reading the 'define bar' documentation, it doesn't appear that there's anyway to determine the currently selected menu option.
>>
>>It also appears that the value of the 'message' attribute is stored as a static value - there doesn't appear to be a way to specify a message expression that will get dynamically executed as a popup bar is highlighted.
>>
>>Another reason we are trying to determine the active menubar is so that we can trap the F1 key and provide our own application specific 'help' for the currently highlighted menu (popup) bar.
>>
>>Any thoughts or ideas appreciated.
>>
>>Thanks!
>>Malcolm
Gregory
Previous
Reply
Map
View

Click here to load this message in the networking platform