Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Count textbox
Message
From
02/06/2005 05:24:15
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Environment versions
Visual FoxPro:
VFP 8
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01019278
Message ID:
01019281
Views:
19
hi,
thank you for reply,
under click at my form i use this code, how and where i can do that
thisform.text4.Value=answers.CountOf1
thisform.text5.Value=answers.CountOf2
thisform.text6.Value=answers.CountOf3
thisform.text7.Value=answers.CountOf4
thisform.text8.Value=answers.CountOf5
thisform.text9.Value=answers.CountOf6

thisform.text1.Value=answers.CountOf7
thisform.text3.Value=answers.CountOf8
thisform.text19.Value=answers.CountOf9
thisform.text21.Value=answers.CountOf10
thisform.text23.Value=answers.CountOf11
thisform.text25.Value=answers.CountOf12

thisform.text26.Value=answers.CountOf13
thisform.text29.Value=answers.CountOf14
thisform.text31.Value=answers.CountOf15
thisform.text33.Value=answers.CountOf16
thisform.text35.Value=answers.CountOf17
thisform.text37.Value=answers.CountOf18
****************************************************************************
thisform.text10.Value=answers.CountOf1+answers.CountOf2+answers.CountOf3+answers.CountOf4+answers.CountOf5+answers.CountOf6;
+ answers.CountOf7+answers.CountOf8+answers.CountOf9+answers.CountOf10+answers.CountOf11+answers.CountOf12;
+ answers.CountOf13+answers.CountOf14+answers.CountOf15+answers.CountOf16+answers.CountOf17+answers.CountOf18
thisform.text12.Value=answers.pctof1
thisform.text13.Value=answers.pctof2
thisform.text14.Value=answers.pctof3
thisform.text15.Value=answers.pctof4
thisform.text16.Value=answers.pctof5
thisform.text17.Value=answers.pctof6

thisform.text2.Value=answers.pctof7
thisform.text11.Value=answers.pctof8
thisform.text20.Value=answers.pctof9
thisform.text22.Value=answers.pctof10
thisform.text24.Value=answers.pctof11
thisform.text27.Value=answers.pctof12

thisform.text28.Value=answers.pctof13
thisform.text30.Value=answers.pctof14
thisform.text32.Value=answers.pctof15
thisform.text34.Value=answers.pctof16
thisform.text36.Value=answers.pctof17
thisform.text38.Value=answers.pctof18

thisform.text18.Value=answers.pctof1+answers.pctof2+answers.pctof3+answers.pctof4+answers.pctof5+answers.pctof6;
+answers.pctof7+answers.pctof8+answers.pctof9+answers.pctof10+answers.pctof11+answers.pctof12;
+answers.pctof13+answers.pctof14+answers.pctof15+answers.pctof16+answers.pctof17+answers.pctof18


thisform.text4.visible  =Thisform.text4.value>0
thisform.label1.Visible=Thisform.text4.value>0
thisform.text5.visible=Thisform.text5.value>0
thisform.label2.Visible=Thisform.text5.value>0
thisform.text6.visible=Thisform.text6.value>0
thisform.label3.Visible=Thisform.text6.value>0
thisform.text7.visible=Thisform.text7.value>0
thisform.label4.Visible=Thisform.text7.value>0
thisform.text8.visible=Thisform.text8.value>0
thisform.text9.visible=Thisform.text9.value>0

thisform.text1.visible=thisform.text1.value>0
thisform.text3.visible=thisform.text3.value>0
thisform.text19.visible=thisform.text19.value>0
thisform.text21.visible=thisform.text21.value>0
thisform.text23.visible=thisform.text23.value>0
thisform.text25.visible=thisform.text25.value>0

thisform.text26.visible=thisform.text26.value>0
thisform.text29.visible=thisform.text29.value>0
thisform.text31.visible=thisform.text31.value>0
thisform.text33.visible=thisform.text33.value>0
thisform.text35.visible=thisform.text35.value>0
thisform.text37.visible=thisform.text37.value>0
************************************************************
thisform.text12.visible=Thisform.text12.value>0
thisform.text13.visible=Thisform.text13.value>0
thisform.text14.visible=Thisform.text14.value>0
thisform.text15.visible=Thisform.text15.value>0
thisform.text16.visible=Thisform.text16.value>0
thisform.text17.visible=Thisform.text17.value>0

thisform.text2.visible=thisform.text2.value>0
thisform.text11.visible=thisform.text11.value>0
thisform.text20.visible=thisform.text20.value>0
thisform.text22.visible=thisform.text22.value>0
thisform.text24.visible=thisform.text24.value>0
thisform.text27.visible=thisform.text27.value>0

thisform.text28.visible=thisform.text28.value>0
thisform.text30.visible=thisform.text30.value>0
thisform.text32.visible=thisform.text32.value>0
thisform.text34.visible=thisform.text34.value>0
thisform.text36.visible=thisform.text36.value>0
thisform.text38.visible=thisform.text38.value>0
thanks

>Use a FOR loop based on your form's controlcount property, reference each control inside the loop using the Controls collection of your form, check the controls to see if their baseclass = "textbox" and if so look to see if they are visible and count accordingly.
>
>>hi all,
>>
>>i need help to count how many textbox.visible .t. at my form as anumber
>>m.count1=3 or 2 or ...
>>
>>thisform.text4.visible =Thisform.text4.value>0
>>thisform.text5.visible=Thisform.text5.value>0
>>thisform.text6.visible=Thisform.text6.value>0
>>thisform.text7.visible=Thisform.text7.value>0
>>thisform.text8.visible=Thisform.text8.value>0
>>thisform.text9.visible=Thisform.text9.value>0
>>
>>thanks
Previous
Reply
Map
View

Click here to load this message in the networking platform