On Sun, 12 Apr 2015, Martin McGlensey wrote: > Tobi, > > Thanks for your response. I have a form with one datasource and twenty two > datacontrols within that datasource. They are used to display name, address, > city, state and other data that fits together logically on one form. Now if > I implement your solution I need to apply it to all of the datacontrols on > the form that display text. Can I use a For each loop, with a test for type > = datacontrol, to set the text position to 0? If that will not work do I > have to set each datacontrol explicitly? >
You can use Form.Controls as explained here in January[0], provided that your DataControls have an easily computable naming scheme, like DataControlX where X ranges through some numbers. Alternatively, you can put all your DataControls in an array once when your form opens and iterate through this array and apply your changes to each of the DataControls. > Should I put the loop code in the > datasource_Change event? > Yes. Regards, Tobi [0] http://sourceforge.net/p/gambas/mailman/message/33222709/ -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk ------------------------------------------------------------------------------ BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT Develop your own process in accordance with the BPMN 2 standard Learn Process modeling best practices with Bonita BPM through live exercises http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF _______________________________________________ Gambas-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gambas-user
