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

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

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

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 - Form size (PocketC Architect)

Form size (PocketC Architect)

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

Postby Aqua32 on Sun Jan 08, 2006 9:20 pm

Hi there,

Im very new to PocketC so you might see quite a few questions in the future.. For now, though, I have a major one!!

Code: Select all
@app myApp
{
   creator = "DBiC";
   name = "My First Application";
   dbname = "MyFirst-DB";
}

@form myForm
{
   id = 1001
   text = "My First Form"
   x = 0, y=0, w=320, h=480
   resizable = true
}

handler myApp.onstart()
{
   myForm.load();
}


Won't work! Says the form has to be 160 x 160 but my TX has a 320x480 display.. Am I doing something wrong? I have read the help file but its still a bit unclear on how I get a form element below the 160th pixel on my screen...

Thanks in advance!

Christopher
Aqua32
 
Posts: 27
Joined: Sun Jan 08, 2006 8:47 pm

Postby dewey on Sun Jan 08, 2006 9:41 pm

On the Palm OS, you must lay out your forms based on a 160x160 screen. The form is automatically expanded to 320x320 on high-res devices. To use the area below 320, you must mark your form as resizable. When your app starts, the form will expand to full size. You can either respond to the onresize event, or just set resize properties to move your controls into the bottom area.
dewey
Site Admin
 
Posts: 749
Joined: Sun Oct 21, 2007 5:12 am

Postby Aqua32 on Sun Jan 08, 2006 10:26 pm

Thanks for getting back to me..

I went ahead and set the vresize = 2 but it's somewhat confusing..

the manual says "then define the form's resize behavior by setting the hresize and vresize properties (generally use stretch for horizontal and vertical)."

Im assuming the 2 is some sort of property value but I couldn't find a constant to reference this... In other words, does 2 mean stretch? what is 1? or 0? is there a 3?

Thanks!
Aqua32
 
Posts: 27
Joined: Sun Jan 08, 2006 8:47 pm

Postby Aqua32 on Mon Jan 09, 2006 1:36 am

run this on a TX and tell me what you see [:(!]

Code: Select all
@app myApp
{
   creator = "DBiC";
   name = "My First Application";
   dbname = "MyFirst-DB";
}

@form myForm
{
   id = 1001
   text = "My First Form"
   x = 0, y=0, w=160, h=160
   resizable = true
   vresize = 2, hresize = 2

   label hLabel
   {
      x = 10,y=150,w=160,h=20
      text = "HHH"
   }
   
   label wLabel
   {
      x = 10,y=30,w=160,h=20
      text = "WWW"
   }
}

handler myApp.onstart()
{
   myForm.load();
}

handler myForm.onresize()
{
   hLabel.text = "H WHAT";//"h "+myForm.h;
   hLabel.y = myForm.h - hLabel.h;

   wLabel.text = "w WHAT";//+myForm.w;
   wLabel.y = hLabel.y - hLabel.h;
}
Aqua32
 
Posts: 27
Joined: Sun Jan 08, 2006 8:47 pm

Postby dewey on Mon Jan 09, 2006 4:10 am

I don't have a TX. What's the problem?

2 means stretch. See the table called "enumerated properties" in the OrbC resource langague doc page.
dewey
Site Admin
 
Posts: 749
Joined: Sun Oct 21, 2007 5:12 am

Postby Aqua32 on Mon Jan 09, 2006 5:04 am

What the previous code does is this:

Shows the WWW where its supposed to be.
Shows the HHH where it supposed to be.

Now for the kicker..

When I "minimize" the graffiti2, the WWW stays where its at and the HHH turns to "w W".. Also, no matter what I change the label to, it will make it the width of 3 characters.

I have tried changing the labels to buttons and changing the text of the button works like it should (except for showing the correct form height (it always shows 160)).

Wish I could find a freeware screen capture utility for Palm tx.

BTW: They're a cool $300 but it's a nice little handheld..

Before collapsing graffiti2 (startup):
Code: Select all
+-----------------+
|My First App     |
|-----------------|
|WWW              |
|                 |
|                 |
|                 |
|                 |
|HHH              |
|                 |
+-----------------+
|Graffiti         |
|                 |
+-----------------|


After collapsing graffiti:

Code: Select all
+-----------------+
|My First App     |
|-----------------|
|WWW              |
|                 |
|                 |
|                 |
|                 |
|                 |
|                 |
|                 |
|w W              |
+-----------------+
+-----------------+

Aqua32
 
Posts: 27
Joined: Sun Jan 08, 2006 8:47 pm

Postby Aqua32 on Mon Jan 09, 2006 5:17 am

I have also tried using buttons but get a strange result!
Code: Select all
@app myApp
{
   creator = "DBiC";
   name = "My First Application";
   dbname = "MyFirst-DB";
}

@form myForm
{
   id = 1001
   text = "My First Form"
   x = 0, y=0, w=160, h=160
   resizable = true
   vresize = 2, hresize = 0

   button hButton
   {
      x = 10,y=150,w=100,h=20
      text = "HHH"
   }
   
   button wButton
   {
      x = 10,y=30,w=100,h=20
      text = "WWW"
   }
}

handler myApp.onstart()
{
   myForm.load();
}

handler myForm.onresize()
{
   hButton.text = "H WHAT"+myForm.h;
   hButton.y = myForm.h - hButton.h;

   wButton.text = "w WHAT"+myForm.w;
   wButton.y = hButton.y - hButton.h;
}

handler hButton.onselect()
{
   alert("hButton Pressed");
}

handler wButton.onselect()
{
   alert("wButton Pressed");
}



Code: Select all
+-----------------+
|My First App     |
|-----------------|
|WWW              |
|                 |
|                 |
|                 |
|                 |
|HHH              |
|                 |
+-----------------+
|Graffiti         |
|                 |
+-----------------+


Firstly, wButton never gets the event when clicked.. It simply doesn't do anything.. But hButton does.. HOWEVER! The Text is changed for hButton to what wButton is supposed to!

EDIT: nevermind about the button example.. I got them to work by adding id's :-D

Code: Select all
@app myApp
{
   creator = "DBiC";
   name = "My First App";
   dbname = "MyFirst-DB";
}

@form myForm
{
   id = 1001
   text = "My First Form"
   x = 0, y=0, w=160, h=160
   resizable = true
   vresize = 2, hresize = 2

   button aButton
   {
      id = 110
      x = 10,y=30,w=100,h=20
      text = "aButton"
   }
   
   button bButton
   {
      id = 111
      x = 10,y=60,w=100,h=20
      text = "bButton"
   }
}

handler myApp.onstart()
{
   myForm.load();
}

handler myForm.onresize()
{
   bButton.y = myForm.h - bButton.h;
   aButton.w = myForm.w - 15;
   
   aButton.text = "width: "+myForm.w;
}

handler aButton.onselect()
{
   alert("aButton Pressed");
}

handler bButton.onselect()
{
   alert("bButton Pressed");
}

Aqua32
 
Posts: 27
Joined: Sun Jan 08, 2006 8:47 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests

cron