Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3368: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3370: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3371: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3372: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
OrbWorks Community Forum • View topic - Edit boxes
Page 1 of 1

PostPosted: Wed Nov 21, 2001 10:52 am
by maurub
Good Morning:
I?Ǭ¥m building a program and I am at the point in wich I need to work with edit boxes. The question is how do I get the content of a edit box into a variable and later, how can I print that content in the same edit box after I push the enter key and that value gets recorded. Thanks in advance.
I looked at the library and found some functions, like editget() but honestly, I dont know how to use that. :)

PostPosted: Wed Nov 21, 2001 3:26 pm
by wolfgang
Hi,

assuming you have already created the edit box (with createtrl (...)), it's easy:

int i_edit_id;
string s_contents;

i_edit_id = 1000; // anything you like (not 1 or 2 though)
createctrl (..., i_edit_id); // refer to the examples on the PocketC webpage for the right parameters, or use PCForm
s_contents = editget (i_edit_id); // reads the contents of the edit box into the variable
editset (i_edit_id, "New text"); // will write "new text" into the edit box

Wolfgang

PostPosted: Wed Nov 21, 2001 4:15 pm
by maurub
Thanks Wolfgang for your help, though I want to tell you something:
if I write, for instance 12345 in an editbox, I understood the way I must follow, but... I will write 12345 and by the instruction varible=editget() I will retrieve the content I wrote into variable ok?, If I want those 12345 to stay in the editbox is it correcto to write:
editset(ctrl ID, +varible) ? regarding to the content of variable?
because "text" I think could not help me much.

PostPosted: Wed Nov 21, 2001 7:41 pm
by wolfgang
I am not sure if I understand you correctly, but editget will not empty the editbox. It only copies the contents into the variable, and the text in the editbox will stay unchanged.

Wolfgang

PostPosted: Thu Nov 22, 2001 11:12 am
by maurub
Hey Wolfgang:
Yes you are completely right. I was thinking and I just cant use a editbox as a visual record of writing. What I just want the following:
1.- write down some word into a edit box.
2.- Finishing the first step,Press the enter key.
3.- store the string or number into a variable
4.- delete the edit box using maybe delgui.
5.- write in the graphic port the word or number I wrote in the edit box, and better if the printing is in the same place as the edit box, so I must delete it first.
6.- using the tab key jump the cursor to the next edit box and repeat the steps.
Of course, storing every single word or number into variables for the data processing.
thanks again Wolfgang.

PostPosted: Fri Dec 21, 2001 3:34 pm
by harx
Hello, i don't know if the problem still exists, but i think i've a answer to your "ENTER"-Problem :)

int i;
createctrl("EDIT", "", 1, 1, 110, 30, 100, 15 , 3);
wndshow(3, 5);

while (i != 13) //while key != enter
{
event(9); //get keydown event
i = key(); //put ascii no. into i
sleep(0); //<= !!important!!
}
alert ("enter was pressed");

PostPosted: Fri Dec 21, 2001 3:44 pm
by harx
Hello, i don't know if the problem still exists, but i think i've a answer to your "ENTER"-Problem :)

int i;
createctrl("EDIT", "", 1, 1, 110, 30, 100, 15 , 3);
wndshow(3, 5);

while (i != 13) //while key != enter
{
event(9); //get keydown event
i = key(); //put ascii no. into i
sleep(0); //<= !!important!!
}
alert ("enter was pressed");