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
[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 - Very beginner question about refresh controls

Very beginner question about refresh controls

Discuss OrbForms Designer and PocketC Architect

Postby sjordi on Wed Apr 18, 2007 9:18 am

Hi,
just a very basic question while I'm evaluating OrbForms...
I have created a form on which I have a button and a label.
When I click on the button, I want to update the label text.

I set an event on the button selection as follows

handler btnCalc.onselect() {
lblResult.text = "Hello" ;
}

The label doesn't display "Hello".
I guess I have to invalidate it to have it redrawn. But how
do I do this?
I checkd the Draw functions, but can't get it to work.
Is there anything like a refresh() or repaint() function?

Thanks for any help.
Steve

Steve JORDI
Prangins, Switzerland
.....................
http://www.sjordi.com
Steve JORDI
Prangins, Switzerland
.....................
http://www.sjordi.com
sjordi
 
Posts: 8
Joined: Thu Nov 16, 2006 11:36 am
Location: Switzerland

Postby Rudi on Wed Apr 18, 2007 9:48 am

Your code is right now ...
But, what is the default text in the inspector in the ide?

Example:
Your Text in the label in IDEs Inspector fpr label lab1 ist "ABC";
your code is this:
lab1.text = "Hello World";
Now the screen on the palm displays: "Hel"
Why this?
The LENGTH of Text of the label is initialisized with the default text.
If you like to write longer Textes to labels, let the default "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

==========================
Switzerland ? German ---
Das Problem ist der Default Text in der IDE (Inspector). Wenn Du hier bsp. nur "ABC" schreibst (oder schlimmer noch, gar nichts) und Du anschliessend mit lab1.text = "ABCDEFG" dann wird der Text in der L?ɬ§nge des Defaults abgeschnitten (L?ɬ§nge in Pixel).
Besser also einfach in Orbforms ein Label mit einem ordentlich langen Defaulttext belegen, z.B. "XXXXXXXXXXXXXXXXXXXXXXXXXXXX". Danach kannst Du mit label.text = "BlaBla" den Text ordentlich ver?ɬ§ndern.
Ansonsten ist Dein codebeispiel richtig so.

Gr?ɬº?É??e
Rudi
Rudi
 
Posts: 33
Joined: Thu Feb 12, 2004 2:42 pm
Location: Germany

Postby sjordi on Wed Apr 18, 2007 11:43 am

Hi Rudi,
thanks for your help. I actually replaced the label where
I write my answer (from a calculation) with a field that
I turned as not editable, and not underlined. Then as soon
as I change it's "text" value, it's correctly updated on
screen.

Switzerland, yes, but from the French speaking part :evil:
I didn't speak Germand for 22 years though. But still can read it :)



Steve JORDI
Prangins, Switzerland
.....................
http://www.sjordi.com
Steve JORDI
Prangins, Switzerland
.....................
http://www.sjordi.com
sjordi
 
Posts: 8
Joined: Thu Nov 16, 2006 11:36 am
Location: Switzerland

Postby FrankG on Wed Apr 18, 2007 3:37 pm

I think another visible call might behandy here too... as in:

handler btnCalc.onselect() {
lblResult.text = "Hello" ;
lblResult.visible = true;
}

After assigning the text, you might want to test the length of the text (See the methods for Draw objects) and adjust the button's w value. If you're shrinking the width, you might (depending on how the screen behaves) need to use a Draw rectangle method to erase the button before re-drawing it with the visible method.

Good luck,
Frank
FrankG
 
Posts: 210
Joined: Thu Jan 23, 2003 7:58 pm


Return to OrbForms Designer and PocketC Architect

Who is online

Users browsing this forum: No registered users and 1 guest

cron