; -------------------------------------------------------------------------------- ; @Title: Example for dialog with a edit field ; @Description: ; Shows a dialog with a single and multi line edit fields ; For more information please refer to training_practice.pdf and ide_user.pdf ; @Keywords: dialog, edit, editfield, multiline, practice ; @Author: REI ; @Copyright: (C) 1989-2021 Lauterbach GmbH, licensed for use with TRACE32(R) only ; -------------------------------------------------------------------------------- ; $Id: dialog_edit.cmm 18691 2021-12-15 18:51:36Z rweiss $ DIALOG ( HEADER "EDIT demo" ; define dialog width by inserting empty text: POS 0. 0. 1. POS 0. 0. 25. 1. TEXT "" POS 1. 0. 23. 1. TEXT "Single Line Text:" TextA: EDIT "type here" "" TEXT "Multi Line Text:" POS 1. 3. 23. 3. TextB: MEDIT "type"+conv.char(0xa)+"here" "" ;buttons OK (Default) and Cancel POS 1. 6. 10. 1. DEFBUTTON "OK" "GOSUB OnClose" POS 14. 6. 10. 1. BUTTON "Cancel" ( DIALOG.END DIALOG.OK "Cancelled" ) ;dialog close event CLOSE "GOSUB OnClose" ;dialog subroutines SUBROUTINE OnClose ( ;get selection &TextA=DIALOG.STRing(TextA); &TextB=DIALOG.STRing(TextB); ;close dialog window DIALOG.END ;print result DIALOG.OK "Single Line Text: ""&TextA""" "Multi Line Text:" "--------------------" "&TextB" "--------------------" ) ) ENDDO