Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why to make a browse window act like modal form?
Message
 
 
À
08/09/1998 14:43:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00133690
Message ID:
00136959
Vues:
23
got it to work. but visually it is not acceptable. have three windows (as my clients say, "three blue bars"). the toplevelform, the form template, and the browse. too much going on.

thanks for the replay. any other ideas?

brenda

>Brenda ---

>Create the window as a new form class. Set the properties visually to what you have in your code.

>Now create a form for you BROWSE, visually, and make it a child of the new form class. Go to the Activate method on the properites window and put the required BROWSE stuff.

>Now, in your main application just issue a DO FORM {formname}. The Activate will fire automatically.

>If you are still confused by this, feel free to email me some same forms and tables where I can duplicate an example of what you are doing and I will be glad to get it working and send it back to you. Be warned, however, that I am on a business trip and Fox-less until Friday but I could do it next weekend.


>>i am starting to see your logic (i was clueless before). but my lack of foxpro knowledge is a problem. my window template is defined below. how do i add code to the activate event? i do not know how to do this outside of the project manager. i only know how to do it visually.
>>
>>thanks - brenda


>>>Hi Brenda ---
>>>
>>>Hmmm....How about sticking with your DEFINE window, put the BROWSE code in the Activate method of the template window. Stick with the prior code I posted. This was, anytime the window is brought up, the browse will fire....


>>>>
>>>>tried it with no luck. i use my defined window only as a template to display the browse window in. the template is never shown or activated. when i did a otemplatewin.show, of course it showed an empty window. it was not an appropriate time to do a browse. with so many browses, i am hoping to only change the template and not have to find each of those browses and change them. but of course i'll take what i can.
>>>>
>>>>thanks for your reply, any other ideas?
>>>>
>>>brenda


>>>>>Brenda ---
>>>>
>>>>>I think you're really limiting yourself by keeping BROWSEs around. Having said that, you might try to put code in the gotfocus event of top level form that looks for the existance of oTemplateWin. If oTemplateWin exists, show it:
>>>>>
>>>>>*** apptoplevelform.GotFocus
>>>>>IF TYPE("oTemplateWin")="O"
>>>>> oTemplateWin.Show
>>>>>ENDIF
>>>>>
>>>>>This may work. Let me know :)
>>>>>

>>>>>>have about 50 browse windows in my app. when the client clicks on the underlying form (usually by mistake in trying to resize the browse) the browse window dissappears. client would like the browse to act like a modal form. all the browse windows are using a window template. tried adding the windowtype = 1. window type is 1 in the debugger but it did not change the behavior of the browse window.
>>>>>>
>>>>>>*-------------------------
>>>>>>Define Window TemplateWin From 0,0 size 3,10 System Name oTemplateWin
>>>>>>
>>>>>>With oTemplateWin
>>>>>> .Width=740
>>>>>> .Height=330
>>>>>> .borderstyle=3
>>>>>> .caption="[ENTER] or [RightMouse] to SELECT - [ESC] to CANCEL"
>>>>>> .FontName="Arial"
>>>>>> .fontsize=8
>>>>>> .controlbox=.f.
>>>>>> .movable=.t.
>>>>>> .closable=.t.
>>>>>> .minbutton=.t.
>>>>>> .maxbutton=.t.
>>>>>> .windowtype=1
>>>>>>EndWith
>>>>>>
>>>>>>Browse NOEDIT NODELETE NOAPPEND Window TemplateWin in window apptoplevelform
>>>>>>*-------------------------
>>>>>>
>>>>>>changing the browse to a grid is not an option. i need to keep the browse windows, but would like them to not dissappear if the client accidentally clicks on the form.
>>>>>>
>>>>>>thanks - brenda
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform