Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fonts in Wait Window
Message
From
14/11/2007 13:19:39
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01268112
Message ID:
01268939
Views:
11
clip ...
>
>Better cerate your own class based on form (not modal). No title bar.
>Add one control based on EditBox in it.
>The call a function:
>
>MyWaitWindow([some message])
>
>
>
>
>FUNCTION MyWaitWindow(lcMessage, lbWAIT, lbNOCLEAR)
>    LOCAL oMsgForm AS YourClassHere OF ClassLibHere
>
>    lcMessage = IIF(VARTYPE(lcMessage)==[C],lcMessage,[default message])
>    lbWAIT    = VARTYPE(lbWAIT) == [L] OR lbWAIT
>    lbNOCLEAR = VARTYPE(lbNOCLEAR) == [L] AND lbNOCLEAR
>    oMsgForm = NEWOBJECT([YourClassHere], [ClassLibHere])
>    oMsgForm.EditBoxName.Value = lcMessage
>    IF lbWAIT
>       oMsgForm.Show(1) && Modal
>    ELSE
>       oMsgForm.NoClear = lbNOCLEAR
>       oMsgForm.Show(0)
>    ENDIF
>RETURN
>
>
>**** Form
>**** Add a property named NoClear defaultvaules - > .f.
>**** KeyPreview = .t.
>
>*** KeyPress Event
>LPARAMETERS nKeyCode, nShift...
>NODEFAULT
>IF NOT thisform.NoClear
>   thisform.Release()
>   RETURN
>ENDIF
>
>
>That way you could handle Font for the edit box, the position of the form and many other things.
>The example above is VERY rough! Not tested, it is just as an example HOW to do that.

This is good. I was able to make it work satisfactorally with a fixed size form. Now to make the form resize to fit the text I will need to proportion the height and width of the form and editbox. Any ideas on how you would proportion it? I can count CRLF to get minimum height but I will need to determine what the width should be and provide for wrapped text.
- Don
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform