Normal Topic PrintBox help (Read 807 times)
tcgeo
Full Member
***
Offline



Posts: 278
Location: Traverse City, Michigan
Joined: May 13th, 2008
PrintBox help
Jul 30th, 2010 at 1:40pm
Print Post Print Post  
I'd like to print an unshaded box similar to BOX_TYPE_UP_FRAME, but with the frame on all sides.  I printed the code below from SBasic Commands to view all available boxes but I can't seem to find/figure out how to get just a plain unfilled box with a dark frame/border.  Also, is it possible to change the width of the border for the box?

Thanks.


Var vLoop as Int
Var vLoopto as Int
Var vCnt as Int
Var vDown as int

     vLoop = 0
     vLoopto = 33
     vCnt = 0
     NewPage(850, 1100)
     While VLoop < vLoopTo
     {
           vLoop = vLoop + 1
           vCnt = vCnt + 1  
           PrintBox(vLoop, (vCnt * 100) + 75, (vDown * 100) + 75, 100, 100)
           PrintString(@Str(vLoop), (vCnt * 100) + 112, (vDown * 100) + 110, 0, "BArial", 24, 0)
            If vCnt = 6 Then
           {
                  vCnt = 0
                 vDown = vDown + 1
           }
     }
      FinishPage()
  
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: PrintBox help
Reply #1 - Jul 30th, 2010 at 1:53pm
Print Post Print Post  
Hello,

Try the following code and let me know if it's the type of box you are looking for

Code
Select All
NewPage(850, 1100)
PrintRGBColor(255, 255, 255)
PrintBox(14, 99, 99, 202, 202)
PrintBox(14, 100, 100, 200, 200)
PrintRGBColor(0, 0, 0)
Finishpage() 



There is no way to change the width of the border but what you can do is stack multiple boxes on top of each other to create the desired thickness.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
tcgeo
Full Member
***
Offline



Posts: 278
Location: Traverse City, Michigan
Joined: May 13th, 2008
Re: PrintBox help
Reply #2 - Jul 30th, 2010 at 1:59pm
Print Post Print Post  
Right on the money Ray,

Thank you.
  
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: PrintBox help
Reply #3 - Jul 30th, 2010 at 2:09pm
Print Post Print Post  
You are welcome. Just to explain what's happening. On any of the shaded boxes, you can change the color of the shading by using the PrintRGBColor() command. So I simply changed the shading to white, stacked two boxes, then changed the color back to black. It is very important to remember to change the color back to black or you'll be printing white text and scratching your head wondering why you're getting nothing but the box on the print out. Don't ask how I know Wink

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
tcgeo
Full Member
***
Offline



Posts: 278
Location: Traverse City, Michigan
Joined: May 13th, 2008
Re: PrintBox help
Reply #4 - Jul 30th, 2010 at 2:24pm
Print Post Print Post  
LOL! OK, I won't ask you..

Thank you very much for the explanation.

Brandon
  
Back to top
IP Logged