Le 27/10/2011 15:50, J_Mischk3 a écrit : > > My idea is to scan a container(form) with several fields ( button, textarea, > text and so on ) and if i can get the class of a Control, i can use special > automated functions to put data from a database into it. > > Example: if Value in DB is 1, akticate Button > > But HOW is it possible to get this. > EXAMPLE: > ' Gambas class file > > Public Sub Form_Open() > Dim C As Control > For Each C In Me.Children > Print "C = "; C > Next > End > > And I get > C = (Label 0x8f7ccf4) > C = (TextBox 0x8f7d8cc) > C = (ToolButton 0x8f8213c) > C = (Button 0x8f8ed44) > > This is the information I need, but you can I get directly? ( "Label", > "Textbox", "MyOwnControlTyp" ) I found Control.Name and much more, but no > Control.Typename >
To manipulate object type system, use the static methods of the Object class. To get the type of a object: Object.Class() or Object.Type(), depending on what you need. See the documentation for more details. Regards, -- Benoît Minisini ------------------------------------------------------------------------------ The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user