Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Too Many Controls on Form
Message
From
22/06/2011 18:03:48
 
 
To
22/06/2011 17:02:20
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01515563
Message ID:
01515611
Views:
62
This message has been marked as a message which has helped to the initial question of the thread.
Create an image file with the maximum length of ticks. Place the image on the form. Use another shape over the image to hide the unneeded ticks at run-time i.e. so that only the number of ticks needed is visible.



>Thanks Jos:
>
>I've attached a screen shot of what I would like. Ideally, there should be several minor ticks between each major tick. But I think you'll get the idea.
>
>............Rich
>
>>Post a screenshot of what you want to achieve. Attach it to this message reply.
>>
>>
>>>>>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......
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Previous
Reply
Map
View

Click here to load this message in the networking platform