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
[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 - SetPalette and newline contd

SetPalette and newline contd

Postby Mikael on Mon Oct 13, 2003 12:16 pm

I've tried SetDepth(5) before Joe, with no luck; the colours don't match those on the original at all. It could be that I missed something, so I'll try again. With regard to the 'newline' problem, I enclose the following code-which I have lifted from the main app and made into a testapp:

//Test
@cid "Test";
@ver "1.0";
@dbname "Test";
@name "Test";
@cmd "par a Test.prc AskMode.prc";

Depth();
AskMode();
ModeA();
ModeB();

include "Fctl.h"
library "PToolboxlib"

Depth(){
SetDepth(8);
AskMode();
}

AskMode(){
Fctl(LOAD,3016);
Fctl(DRAW,3016);
FastBmp(0,0,3019);//.bmp with text asking which mode required

while(1){
switch(Fevent(1)){
case:3017://Mode A button with multiline text
Fctl(FREE,3016);
ClearBuf();
ModeA();
break;

case:3018://Mode B button with multiline text
Fctl(FREE,3016);
ClearBuf();
ModeB();
break;
}}}

ModeA(){
alert("Mode A chosen.");
exit();
}

ModeB(){
alert("Mode B chosen.");
exit();
}

main(){
Depth();
AskMode();
ModeA();
ModeB();
}

I've tried this test app with the same results-although I haven't tried SetDepth() as you asked. If that doesn't work, and I can't find another solution, I'll just use a graphical button instead.

Thanks in advance,

Mikael
Mikael
 
Posts: 156
Joined: Sun Apr 13, 2003 9:19 am
Location: Denmark

Postby Mikael on Mon Oct 13, 2003 12:22 pm

Sorry, I meant SetText(), and not SetDepth() at the end of my last post![:0]

Mikael
Mikael
 
Posts: 156
Joined: Sun Apr 13, 2003 9:19 am
Location: Denmark

Postby jstadolnik on Mon Oct 13, 2003 1:05 pm

You've stumbled onto a PalmOS bug. It does not support multi-line button text. The only time the PToolboxLib will resize a button is on FsetText calls. If you're not calling that function my libraries not doing.

There are two work arounds:
1) Use graphical buttons (as you suggested),
2) Create buttons without text and use textbox() to draw text in the them after the form has been drawn (this is the old <OS3.5 bitmap in button trick).

With regards to SetDepth(5). It sets a standard 16 color VGA palette. You can alter also alter any palette to your liking with SetPalette().

Joe

BTW: There is a reply button on forum post, it's better then creating new post when hashing out an issue.

The PToolboxLib guy.
http://www.geocities.com/retro_01775/PToolboxLib.htm
jstadolnik
 
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA

Postby Mikael on Tue Oct 14, 2003 6:13 am

I'd already tried the textbox() method on one of the buttons, but I didn't like the way the foreground changed to black instead of blue. I tried to remedy this with UIcolor without success; so I just went with graphical buttons instead I. With regard to SetDepth again, I've either been setting the depth to 5 and trying to display, or setting it to 4 and using SetPalette(). I'll try combining the two and see what happens.

Thanks for the tips,

Mikael.
Mikael
 
Posts: 156
Joined: Sun Apr 13, 2003 9:19 am
Location: Denmark


Return to PocketC for Palm OS KB

Who is online

Users browsing this forum: No registered users and 2 guests

cron