Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Too Many Controls on Form
Message
From
22/06/2011 16:40:31
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01515563
Message ID:
01515583
Views:
65
>>I've created a form on which I need (want????) to put a line with a number of tick marks on it. For the sake of arguement, the tick marks are spaced six units apart. The number is variable and depends upon some data used by the form.
>>
>>What I've done is create a large number of line controls, each one representing one of the tick marks. I now have far too many of these controls on the form and it is slowing down the form instantiation and closing.
>>
>>I need an alternate approach and am hoping for suggestions. Please make them simple enough that my evil-twin Skippy can't mess it up for me.
>>
>>Thanks to all..............Rich
>
>May be instead of placing an object you can draw a point directly on the form?

Could you expand on this a bit? For the line with tick marks I'm doing
** Create the line
thisform.AddObject("objname","line")
WITH EVALUATE("thisform.objname")
     .Top = t
     .Left = l
     .height = 0
     .width = w 
     .visible = .T.
ENDWITH

** Create all the tick marks
SELECT ticks
SCAN
     thisform.AddObject('lineTick'+PADL(RECNO(),3,'0'),"line")
     WITH EVALUATE("thisform.lineTick"+PADL(RECNO(),3,'0'))
          .Left = 83 + (RECNO()*6)
          .Top = lnTop - 5
          .height = 10
          .width = 0
          .visible = .T.
     ENDWITH
ENDSCAN
How would I "draw the line" directly on the screen progamatically?

Thanks......
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform