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 - CControls

CControls

Discuss PocketC for Palm OS (including Desktop Edition)

Postby tunga on Sat Sep 10, 2005 4:01 am

I am new to CControls and not able to understand the usage of dropdown menu. I wanted use the dropdown menu here for percentage (int) and later to strings. The program is herewith enclosed with my coments
Thanking you in advance
tunga
//DropDown.c
float a,b,c;
int i;
string s;
include "Ccontrols.c"
Chandle lblinput, lblPer, lblout;
initcontrols(){
lblinput=Clabel(50,35,50,1,2,1);
lblPer=Cdropdown(50,64,15,5);
lblout=Clabel(50,90,50,1,2,1);
}
initcontents(){
Csetcontent(lblinput,"Enter Numb");
Csetcontent(lblout,"Output");
}
inititems(){
Cadditem(lblPer,"08");
Cadditem(lblPer,"10");
Cadditem(lblPer,"12");
Cadditem(lblPer,"14");
Cadditem(lblPer,"16");
Cadditem(lblPer,"18");
Cadditem(lblPer,"20");
}
drawcontrols(){
Cdraw(lblinput);
Cdraw(lblPer);
Cdraw(lblout);
}
on_lblinput(){a =gets("get a nmber");
Csetcontent(lblinput,format(a,2));
Cdraw(lblinput);
}
on_lblPer(){/* b=Cgetcursel(lblPer);
alert (format(b,0));
Csetcontent(lblPer,format(b,0));
Cdraw(lblPer);*/Here I tied to input the number, but I want to get the number entered in Dropdown list which is 8,10,12,14,16,18,20.
}
on_lblout(){c =a*(b/100);
Csetcontent(lblout,format(c,2));
Cdraw(lblout);
}
messageloop(){
int e;
while(1){
e=event(1);
if(Cevent(lblinput,e)) on_lblinput();
else if(Cevent(lblPer,e)) on_lblPer();
else if(Cevent(lblout,e)) on_lblout();
}
}

main(){
clearg();
graph_on();
title("DropDown");
initcontrols();
initcontents();
inititems();
drawcontrols();
messageloop();
}

Be a leader not a follower
Life is full of learning
tunga
 
Posts: 7
Joined: Mon Jul 23, 2001 1:48 am
Location: India

Postby tunga on Wed Sep 14, 2005 12:52 am

I was told to post the program in this forum by the originator of pocketC so that some one will help me and guide me,but I found lots of visitors to this page without nay comments/sugestion.Unfortunatly ther are no books availble with souce code. I have one book written by Mr Andy Harrys that is Palm Programing for absolute beginer. I hope at least some one will reply me.
tunga
Life is full of learning
tunga
 
Posts: 7
Joined: Mon Jul 23, 2001 1:48 am
Location: India

Postby MarkS on Sun Dec 25, 2005 2:35 am

Sorry, don't have the answer for you either, tunga.

I'm sure the reason that the others you mentioned that have seen this post but didn't post anything, don't know the answer either and therefore, didn't want to post.

Wish I could be of more help. Maybe someone else with see this and respond....

Mark
MarkS
 
Posts: 44
Joined: Tue Jul 02, 2002 2:04 am

Postby dcalp on Mon Dec 26, 2005 12:19 pm

Hi tunga:
I missed your original post.
You must use Cgetcontent to retrieve de dropdown displayed value, Cgetcursel gives you the index or order value of the selected item.

Kind regards



Diego

Pocket VisualForms
Visual design for PocketC
http://www.diegocalp.com.ar
Diego

Pocket VisualForms
Visual design for PocketC
http://www.diegocalp.com.ar
dcalp
 
Posts: 115
Joined: Thu Dec 06, 2001 9:53 am
Location: Argentina


Return to PocketC for Palm OS

Who is online

Users browsing this forum: No registered users and 2 guests

cron