Grayth
10-20-2005, 01:54 PM
Hi I'm trying to figure out how to query the value in a textfield
when a button is pressed, my proc code is incorrect but I'm not sure how to fix it
here's the code
//window check
if(`window -exists $winName`)
deleteUI -window $myWindow;
//window creation here
string $winName = "ProCam";
string $myWindow= `window -title "Pro Camera Setup"
-w 225 -h 100 -s 1 -mnb 1 -mxb 0
$winName`;
//window layout
string $form = `formLayout -nd 225 myform`;
string $labl= `text -label "Camera Name"`;
string $cameraName = `textField -w 100`;
string $butn = `button -label "Create Camera" -c "Values" mybutton`;
//controls for windows here
formLayout -e -af $labl "top" 10 myform;
formLayout -e -af $cameraName "top" 8 myform;
formLayout -e -af $cameraName "left" 70 myform;
formLayout -e -af $butn "top" 30 myform;
proc Values()
{
textField -q -tx $cameraName;
print $cameraName
}
showWindow $winName;
Thanks for all your help,
Troy
when a button is pressed, my proc code is incorrect but I'm not sure how to fix it
here's the code
//window check
if(`window -exists $winName`)
deleteUI -window $myWindow;
//window creation here
string $winName = "ProCam";
string $myWindow= `window -title "Pro Camera Setup"
-w 225 -h 100 -s 1 -mnb 1 -mxb 0
$winName`;
//window layout
string $form = `formLayout -nd 225 myform`;
string $labl= `text -label "Camera Name"`;
string $cameraName = `textField -w 100`;
string $butn = `button -label "Create Camera" -c "Values" mybutton`;
//controls for windows here
formLayout -e -af $labl "top" 10 myform;
formLayout -e -af $cameraName "top" 8 myform;
formLayout -e -af $cameraName "left" 70 myform;
formLayout -e -af $butn "top" 30 myform;
proc Values()
{
textField -q -tx $cameraName;
print $cameraName
}
showWindow $winName;
Thanks for all your help,
Troy
