Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bad menu behavior
Message
From
03/05/2007 09:36:20
 
 
To
01/05/2007 14:07:00
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Miscellaneous
Thread ID:
01221617
Message ID:
01222162
Views:
20
Hi all,

I was wondering if anyone can even reproduce the problem using the code below, if at all?

>Hi all,
>
>Our application can 'store' away user defined menu and at some point, the menu choices exceeded the number that can be displayed. As such, the scroll up and down icons are displayed on the top and bottom of the popup respectively so the user can scroll through the menu choices. Then we got feedback that the menu choices are no longer available after they perform certain tasks.
>
>This code snippet simulates the 'weird' behavior of the menu. This behavior is reproducable in VFP8SP1 and VFP9SP1.
>
>Steps:
>1. Start VFP and create a new program. Be sure that the Program Editor window is NOT MAXIMIZED. Copy and paste the following code below.
>2. Run the code and inspect the menu. You should see the scroll buttons.
>3.1 Maximize the Program editor and the menu will now list only the maximum number of menu choices that can be displayed.
>3.2 You can also reproduce the behavior by clicking on Modal prompt.
>3.3 Running the code using a Maximized Program editor will break the menu right off the bat.
>
>Thoughts?
>
>
>on key label F12 ExitTest()
>wait window "Press F12 to cancel"
>define pad MenuTest of _msysmenu prompt '\<MenuTest'
>on pad MenuTest of _msysmenu activate popup FirstLevel
>define popup FirstLevel margin shadow scroll
>define bar 1 of FirstLevel prompt "FirstLevel"
>on bar 1 of FirstLevel activate popup SecondLevel
>define popup SecondLevel margin shadow scroll
>for i = 1 to 100
>   define bar i of SecondLevel prompt transform(i)+". " + iif(mod(i,2)=0,"Modal","Modeless")
>   on selection bar i of SecondLevel DoMenu(mod(bar(),2)=0)
>endfor
>read events
>
>procedure DoMenu(lModal)
>   public oTest
>   oTest = createobject("form")
>   if lModal
>      oTest.Show(1)
>   else
>      oTest.Show
>   endif
>endproc
>
>procedure ExitTest
>   set sysmenu to default
>   cancel
>endproc
>
ramil
~~ learning to stand still
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform