Loading ...
Sorry, an error occurred while loading the content.

RE: [libertybasic] Textbox colors, other than default

Expand Messages
  • Jim Hiley
    As Stefan pointed out, my answer is not correct for textboxes, only graphic boxes. To understand how COLOREXP.BAS works, try this modification. Each line is
    Message 1 of 5 , Mar 18, 2013
    • 0 Attachment
      As Stefan pointed out, my answer is not correct for textboxes, only graphic
      boxes.

      To understand how COLOREXP.BAS works, try this modification.
      Each line is drawn with a different color:


      graphicbox #1.graphics, 10, 10, 250, 240
      open "graphics" for window as #1
      print #1.graphics, "size 2 ; down ; fill black"
      for x = 10 to 250 step 2
      mycolor$="255 ";x;" 0 "
      print "mycolor$ = ";mycolor$
      print #1.graphics, "color "; mycolor$
      print #1.graphics, "place 0 "; (x-10); " ; goto 250 "; (x-10)
      next x
      print #1.graphics, "flush"

      wait


      Jim


      -----Original Message-----
      From: libertybasic@yahoogroups.com [mailto:libertybasic@yahoogroups.com] On
      Behalf Of KELLER RICHARD
      Sent: Tuesday, 19 March 2013 09:30
      To: libertybasic@yahoogroups.com
      Subject: RE: [libertybasic] Textbox colors, other than default

      When I try the COLOREXP.bas that came with the product, I get beautiful
      orange. But when I try the print #handle you list below, I get No color at
      all. Lets say I know it will work, but cant understand why it doesn't.

      --- On Mon, 3/18/13, Jim Hiley <jim@...> wrote:

      From: Jim Hiley <jim@...>
      Subject: RE: [libertybasic] Textbox colors, other than default
      To: libertybasic@yahoogroups.com
      Date: Monday, March 18, 2013, 5:56 PM

      From the Help file:
      print #handle, "color red(0-255) green(0-255) blue(0-255)"
      The second form of color specifies a pure RGB color. This only works with
      display modes
      greater than 256 colors. To create a violet color for example, mix red and
      blue:
      print #handle, "color 127 0 127"

      Jim
    Your message has been successfully submitted and would be delivered to recipients shortly.