ID: Q125615
The information in this article applies to:
When a POPUP is defined and activated in FoxPro version 2.5 for Windows, it requires a single mouse click to get the focus and activate a GET object. However, in versions 2.5b and later, it requires two mouse clicks to activate a GET object such as a push button.
Although this problem occurs in Visual FoxPro, this situation can be avoided by using the Visual FoxPro Form Designer and its Multiselect functionality.
If the reason for using a User Defined POPUP is to get the Multiple-Select look in a popup, the workaround for this problem is to create a multiple- select GET POPUP object as outlined in the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q104258
TITLE : Sample Code for Creating Multiple-Selection GET List Box
We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
The following code example demonstrates this problem. To clearly see the problem, you need to run the code in version 2.50 and then again in version 2.50b or later.
1. Place the following code in a new program file:
DEACTIVATE POPUP ALL
DEACTIVATE WINDOW ALL
CLEAR ALL
CLOSE ALL
SELECT A
USE C:\fpw26\foxhelp
STORE 0 TO ok
STORE 0 TO CANCEL
DEFINE WINDOW grupri ;
FROM 5.5,16 TO 24.5,90 TITLE "Selection";
NOFLOAT ;
NOCLOSE ;
NOMINIMIZE ;
COLOR RGB(0,0,0,192,192,192) ;
SYSTEM
ACTIVATE WINDOW grupri NOSHOW SAME
SELECT A
DEFINE POPUP grupri FROM 2.5,40 TO 7,60 IN WINDOW "grupri";
MULTISELECT SCROLL MARGIN
SET MARK OF POPUP grupri TO ""
GO TOP
FOR i = 1 TO 10
DEFINE BAR i OF grupri PROMPT TOPIC
SKIP
NEXT
ACTIVATE POPUP grupri NOWAIT
@ 13.4,12.800 GET okey ;
PICTURE "@*HN Ok" ;
SIZE 2.215,13.167,0.667 ;
DEFAULT 0 ;
FONT "MS Sans Serif",8 ;
STYLE "B"
@ 13.4,26.800 GET CANCEL ;
PICTURE "@*HT Cancel" ;
SIZE 2.215,13.167,0.667 ;
DEFAULT 0 ;
FONT "MS Sans Serif",8 ;
STYLE "B"
READ CYCLE
DEACTIVATE WINDOW ALL
DEACTIVATE POPUP ALL
CLOSE ALL
CLEAR ALL
RETURN
2. Run the code, and select an item from the popup. Then Click the Cancel
button. Using version 2.50, you need to click Cancel to cancel the
program, but using version 2.50b or later, you need to click the Cancel
button twice.
Additional query words: popup multiselect kbFP250 kbFP260
Keywords : kbVFp kbVFp500abug kbVFP260bug kbVFP250bbug FoxWin FxprgGeneral kbbuglist
Version : WINDOWS: 2.5a,2.5b,2.6x,3.0,3.0b,5.0,5.0a,6.0
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: October 22, 1998