July 13, 2024, 07:33:28 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Printing in a Window

Started by Dennisc, December 17, 2006, 10:22:12 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dennisc

Hi
Have a small issue having ported an app from IBasic Std to EBasic. Under IBasic Std when I PRINT to a window, the printed text's background color is that of the window's BG color. Under IBasic Pro and EBasic (code snippet attached) the printed text's BG is white.

I can obviously fix it by not using PRINT but a text control but I would like to know what the difference is between IB Std and IB Pro/EBasic's PRINT statement. I suspect I must use some or other color statement before printing but cannot find one. If there is an incompatibility, then as long as I am aware of it, I can recode a work-around.

The buttons in the code snippet below do not work so use the close window button to close.

Regards
Dennis


$MAIN

DEF winLogin: WINDOW

OPENWINDOW winLogin,5,5,500,500,@MINBOX|@MAXBOX|@MAXIMIZED,0,"",&wsubLoginÂÃ, 
SETWINDOWCOLOR winLogin, RGB(224,220,224)ÂÃ, 

MOVE winLogin,230,5ÂÃ, 
PRINT winLogin, "ABCDEFG"ÂÃ, 
MOVE winLogin,230,60ÂÃ, 
PRINT winLogin, "XYZZZZZZZZ"ÂÃ, 
MOVE winLogin,28,170ÂÃ, 
CONTROL winLogin,@Edit,"",350,130,110,22,0,1
MOVE winLogin,275,134ÂÃ, 
PRINT winLogin, "ÂÃ,  ÂÃ,  User id:"ÂÃ, 
CONTROL winLogin,@Edit,"",350,160,110,22,0x50800020,2
MOVE winLogin,275,164ÂÃ, 
PRINT winLogin, "Password:"ÂÃ, 
CONTROL winLogin,@Button,"OK",300,212,70,26,0x50800000,112
CONTROL winLogin,@Button,"Cancel",390,212,70,26,0x50800000,113
intLoginRun = 1ÂÃ, 
WAITUNTIL intLoginRun <> 1ÂÃ, 
CLOSEWINDOW winLoginÂÃ, 
END

SUB wsubLogin
SELECT @CLASSÂÃ, 
CASE @IDCLOSEWINDOWÂÃ, 
intLoginRun = 0ÂÃ, 
ENDSELECTÂÃ, 
RETURNÂÃ, 
ENDSUB
Failure is only the opportunity to begin again more intelligently
www.denniscomninos.com

GWS

Hi Dennis,

Try: BACKPEN(winLogin,RGB(224,220,224))

regards, :)

Graham
Tomorrow may be too late ..

Dennisc

Duh! Of course!! :-[ :-[

Thanks Graham! :) :)
Failure is only the opportunity to begin again more intelligently
www.denniscomninos.com

Dennisc

Does point to a difference between Std and Pro/EBasic though. In Std BACKPEN is not needed but in Pro/EBasic it is.

Thanks for quick response!

Failure is only the opportunity to begin again more intelligently
www.denniscomninos.com