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

Edit boxes

Discuss topics that apply across the products, such as the PocketC language, or development in general

Postby maurub on Wed Nov 21, 2001 10:52 am

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. :)
maurub
 
Posts: 17
Joined: Thu May 31, 2001 5:44 pm
Location: Mexico

Postby wolfgang on Wed Nov 21, 2001 3:26 pm

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
Composing music on the PocketPC! - http://www.pdamusician.com
wolfgang
 
Posts: 281
Joined: Tue Dec 12, 2000 4:22 am
Location: USA

Postby maurub on Wed Nov 21, 2001 4:15 pm

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.
maurub
 
Posts: 17
Joined: Thu May 31, 2001 5:44 pm
Location: Mexico

Postby wolfgang on Wed Nov 21, 2001 7:41 pm

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
Composing music on the PocketPC! - http://www.pdamusician.com
wolfgang
 
Posts: 281
Joined: Tue Dec 12, 2000 4:22 am
Location: USA

Postby maurub on Thu Nov 22, 2001 11:12 am

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.
maurub
 
Posts: 17
Joined: Thu May 31, 2001 5:44 pm
Location: Mexico

Postby harx on Fri Dec 21, 2001 3:34 pm

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");
harx
 
Posts: 3
Joined: Fri Dec 21, 2001 3:31 pm

Postby harx on Fri Dec 21, 2001 3:44 pm

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");
harx
 
Posts: 3
Joined: Fri Dec 21, 2001 3:31 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron