Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* ej03_EventosTexto
- En este ejemplo veremos como se crea una forma, como se pone texto
- dentro de la forma con un control de texto y como se usan algunos
- eventos de dicho control */
- #include <radc++.h>
- //create new form
- Form Form1("Eventos Texto - RAD C++ Ejemplo");
- //create new text box
- TextBox text1("Teclee aqui", AUTO_ID, 10, 15, 200, 25, Form1);
- //create new control procedure for form, procedure1 is procedure name
- FormProcedure procedure1 (FormProcArgs) {
- //capture event ON_CLOSE which is fired when form is closed, [X] is clicked
- ON_CLOSE() {
- //exit application
- Application.close();
- }
- //capture text change event, means text hs been changed
- ON_TEXT_CHANGED ( text1 ) {
- Form1.caption = "Cambio a : " + text1.text;
- }
- //always return 0
- return 0;
- }
- //rad c++ main program
- rad_main()
- //attach the created procedure with form
- Form1.procedure = procedure1;
- //set focus to textbox when program starts
- text1.focus();
- rad_end()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement