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 - Share a Table?

Share a Table?

Discuss OrbForms Designer and PocketC Architect

Postby orbFan on Fri Sep 30, 2005 10:34 pm

Hi everyone.
Using OrbForms, is there a way we can create a table with expandable columns, and rows with alternating colors (as I have seen in other programs)?
Thanks.

Gerald
orbFan
 
Posts: 21
Joined: Thu Sep 08, 2005 8:02 am
Location: Philippines

Postby orbFan on Sun Oct 02, 2005 1:10 pm

I am trying to make a table with 3 columns. As suggested by Gazza (in a 7/11/05 topic posted by shannyo), I am using UIList.setdrawfunc to establish an outright column separation between rows (like a grid). However, I can't get it right. I have the right items displayed on the first column, but on the second and third columns, "bread" and "dog" are the only items displayed, respectively. I am presenting my source code below for correction. I really need help on this.

Thanks.


Here's my source code (after setting up a UIList):


void drawListThings(int item, int x, int y, int w, int h, string text);

string myColors[4] = {"red", "green", "blue", "white"}; // first column items
string myFood[4] = {"bread", "fries", "hamburger", "steak"}; // second column items
string myPets[4] = {"dog", "cat", "horse", "bird"}; // third column items

Draw draw;

handler mainForm.onopen() {
draw.attachForm(this);
listThings.setitems(4, myColors);
listThings.setdrawfunc(drawListThings);
}

void drawListThings(int item, int x, int y, int w, int h, string text) {
int n;
draw.begin();
draw.textTrunc(x, y, w-12, text);
draw.textTrunc(x+30, y, w-12, myFood[n]);
draw.textTrunc(x+60, y, w-12, myPets[n]);
draw.end();
}
orbFan
 
Posts: 21
Joined: Thu Sep 08, 2005 8:02 am
Location: Philippines

Postby nmc on Sun Oct 02, 2005 7:12 pm

try to initialize "n" with proper values before using it as index to your array :-)
nmc
 
Posts: 197
Joined: Tue May 27, 2003 8:42 pm
Location: Germany

Postby orbFan on Mon Oct 03, 2005 10:15 pm

I still can't get it. Can you please provide me the exact method of initializing "n" so the proper items on the second and third columns can be displayed? Or could there be another way?

For a newbie like me, this really is a gargantuan task.

Thanks.
orbFan
 
Posts: 21
Joined: Thu Sep 08, 2005 8:02 am
Location: Philippines

Postby nmc on Tue Oct 04, 2005 6:59 am

Looks like you want to show "red", "green", "blue", "white" along with "dog", "cat", "horse", "bird", so just use the same index (n = item;)

Maybe this bcomes more clear to you when you realize that
draw.textTrunc(x, y, w-12, text);
is the same (in your code) as
draw.textTrunc(x, y, w-12, myColors[item]);
nmc
 
Posts: 197
Joined: Tue May 27, 2003 8:42 pm
Location: Germany

Postby orbFan on Tue Oct 04, 2005 11:49 am

Thanks a lot, nmc. If not for your help, I could have spent a lifetime trying to figure out a way --- unsuccessfully.
Thanks again.

Gerald
orbFan
 
Posts: 21
Joined: Thu Sep 08, 2005 8:02 am
Location: Philippines


Return to OrbForms Designer and PocketC Architect

Who is online

Users browsing this forum: No registered users and 1 guest

cron