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

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 112
[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:112)
[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:112)
[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:112)
[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:112)
OrbWorks Community Forum • View topic - CControls - Will not disply drop down data
Page 1 of 1

PostPosted: Sat Feb 25, 2006 6:15 pm
by Fighterpilot
I am using the "new" CControls provided with version 7.1.0 that supports the color screens. When creating a dropdown list, the text shows in the field, but doesn't show up in the drop down when picking.

Anyone have any suggestions?

PostPosted: Sat Feb 25, 2006 6:36 pm
by Fighterpilot
I figured out that you need to provide the Cinit(); command before drawing, but the text in the dropdown box is not showing. I know it it is there because I can still pick it, but can't see it.

Here's my code (basically copied from some exmaples in the Palm Programming book):

-----------------

include "Ccontrols.c"

Chandle drpChklist, btnQuit;

initcontrols() {
drpChklist=Cdropdown(2, 16, 90, 3);
btnQuit=Cbutton(90, 135, 33, 12, 1, 4);
}

initcontents() {
Csetcontent(btnQuit,"quit");
}

inititems() {
Cadditem(drpChklist, "Takeoff");
Cadditem(drpChklist, "Landing");
Cadditem(drpChklist, "Emergency");
}

drawscreen(){
clearg();
Cdraw(drpChklist);
Cdraw(btnQuit);
}

on_drpChklist(){
}

on_btnQuit(){
exit();
}

mainscreenloop() {
int e;
while(1) {
e=event(1);
if(Cevent(drpChklist, e)) on_drpChklist();
else if(Cevent(btnQuit,e)) on_btnQuit();
}
}

main() {

graph_on();
title("Falcon Helper");
Cinit();
initcontrols();
initcontents();
inititems();
drawscreen();
mainscreenloop();

} // end main