Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scrolling through a typed text ?
Message
From
20/11/2009 12:36:29
 
 
To
19/11/2009 23:09:34
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01435706
Message ID:
01435823
Views:
40
I agree with Naomi that you should design the form visually with CREATE/MODIFY FORM and then DO FORM...........

But........If you really want to define everything in code...........

Does it help to define the Desktop (or ShowWindow) property inside the DEFINE CLASS statement rather than changing oFrm???
(see changes below)

>Ok this is all working now except for the desktop .t. part. I would like this form to appear outside the vfp window and i keep getting an error saying "property desktop is read-only"
>What am i missing?
>k
>
>LOCAL oFrm
>
>oFrm= createOBJECT("Rooms")
>oFrm.Top = 24
>oFrm.Left =400
>oFrm.Height = 373
>oFrm.Width = 500
>*** oFrm.desktop = .t. moved to class definition
>
>oFrm.edit1.value = filetostr('sample.TXT')
>
>
>oFrm.Show(1)
>
>************************************
>DEFINE CLASS classrooms AS Form
>
>
> ADD OBJECT Edit1 AS EditBox WITH ;
> FontSize = 7.5, ;
> Height= 409, ;
> Left= 2, ;
> fontname='Lucida Console', ;
> ReadOnly= .t., ;
> TabIndex= 2, ;
> Top= 2, ;
> Width= 489, ;
> Value= ""
> desktop = .t. &&& moved from setting oFrm
>ENDDEFINE
>
>
>Public Event MouseWheel As MouseWheelEventHandler
>
>
>PROCEDURE Object.MouseWheel
>LPARAMETERS nDirection, nShift, nXCoord, nYCoord
>
>PROCEDURE edit1.MouseWheel
> LPARAMETERS nDirection, nShift, nXCoord, nYCoord
> * Set focus to this control
> If Type("thisform.ActiveControl") # "O" or thisform.ActiveControl < > this
> this.SetFocus
> EndIf
> ENDPROC
>
>
>oFrm.hide(1)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform