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

As a newbie, I can't seem to get the handle of fonts....

Expand Messages
  • ltdas181
    Assume that I want to take the phrase United States of America and enlarge it, embolden it, underline it and assigne it to a variable that I can now place in
    Message 1 of 6 , Apr 4 5:08 AM
      Assume that I want to take the phrase "United States of America" and
      enlarge it, embolden it, underline it and assigne it to a variable
      that I can now place in any window and in any place within a program
      that I like. Can someone show me the coding that would create this
      variable?
    • William E. Lopez
      usa$= United States of America. Okay, usa$ contains United States of America. Now you can print it anywhere you have a container. You can change fonts,
      Message 2 of 6 , Apr 4 6:05 AM
        usa$="United States of America."

        Okay, usa$ contains "United States of America." Now you can print it anywhere you have a container. You can change fonts, colors, and sizes all with LB code. See the help file topic, "How to Specify Fonts" for some examples.

        Hope this helps!


        [Non-text portions of this message have been removed]
      • Zachary Antilley
        What you re wanting to do can be done, but it s not as simple as just dumping it all in to a variable and using one command to display it. Your application may
        Message 3 of 6 , Apr 4 6:24 AM
          What you're wanting to do can be done, but it's not as simple as just
          dumping it all in to a variable and using one command to display it.

          Your application may vary, but to display this in a dialog window, the
          below code will work;

          ---
          usa$="United States of America"

          WindowWidth=640
          WindowHeight=480
          statictext #main.handle, usa$, 10, 10, 600, 40 'places your USA text
          statictext #main.handle1, "Some other text", 10, 50, 600, 20 'Places
          some other text with the default font
          open "example" for window as #main 'Opens the window
          print #main.handle, "!font Times_New_Roman 25 bold underscore"
          'Changes the font for the USA text
          print #main, "trapclose [quit]"
          wait

          [quit]
          close #main
          end
          ---

          You can look in the help under How to Specify Fonts for more information
          on fonts.

          Hope this helps,

          Zack




          ltdas181 wrote:

          >Assume that I want to take the phrase "United States of America" and
          >enlarge it, embolden it, underline it and assigne it to a variable
          >that I can now place in any window and in any place within a program
          >that I like. Can someone show me the coding that would create this
          >variable?
          >
          >
          >
          >
          >
          >
          >Yahoo! Groups Links
          >
          >
          >
          >
          >
          >
          >
          >
        • Don Sjostedt
          Bill, I know how to create a string variable, what I want to know is code to change that variables fonts, etc. I don t seem to be picking it up from the help
          Message 4 of 6 , Apr 4 6:50 AM
            Bill,

            I know how to create a string variable, what I want
            to know is code to change that variables fonts, etc. I
            don't seem to be picking it up from the help files.

            --- "William E. Lopez" <welopez@...> wrote:

            > usa$="United States of America."
            >
            > Okay, usa$ contains "United States of America." Now
            > you can print it anywhere you have a container. You
            > can change fonts, colors, and sizes all with LB
            > code. See the help file topic, "How to Specify
            > Fonts" for some examples.
            >
            > Hope this helps!
            >
            >
            > [Non-text portions of this message have been
            > removed]
            >
            >


            __________________________________________________
            Do You Yahoo!?
            Tired of spam? Yahoo! Mail has the best spam protection around
            http://mail.yahoo.com
          • William E. Lopez
            I did my code a little different than Zachary s, but you should get an idea of the commands needed to specify a new font, and where to print the font, in a
            Message 5 of 6 , Apr 4 9:36 AM
              I did my code a little different than Zachary's, but you should get an idea of the commands needed to specify a new font, and where to print the font, in a graphics window. The precise syntax will be different for a statictext, textbox, and text editor, but at some point in time you will have to learn how to grasp help file topics.

              [code]
              NOMAINWIN
              usa$="United States of America"

              WindowWidth=640
              WindowHeight=480
              UpperLeftX=INT((DisplayWidth-WindowWidth)/2)
              UpperLeftY=INT((DisplayHeight-WindowHeight)/2)

              open "example" for GRAPHICS_nsb as #main 'Opens the window for graphics
              print #main, "trapclose quit"
              print #main, "font Times_New_Roman 25 bold underscore" 'First font
              PRINT #main, "FILL 255 255 150"
              PRINT #main, "BACKCOLOR 255 255 150"
              PRINT #main, "COLOR blue"
              PRINT #main, "PLACE 100 200"
              PRINT #main, "DOWN"
              PRINT #main, "\";usa$
              PRINT #main, "PLACE 50 100"
              PRINT #main, "COLOR red"
              PRINT #main, "font arial 30 italic" 'Second font
              PRINT #main, "\"; usa$
              PRINT #main, "COLOR green"
              PRINT #main, "font courier_new 18 bold" 'Third font
              FOR x=-200 TO 600
              PRINT #main, "PLACE "; x; " 300" '< 300 is down, x is changing
              PRINT #main, "\ "; usa$
              CALL pause
              NEXT x



              wait

              SUB quit handle$
              close #main
              end
              END SUB

              SUB pause
              TIMER 50, [cont]
              WAIT
              [cont]
              TIMER 0
              END SUB
              [/code]

              [Non-text portions of this message have been removed]
            • Don Sjostedt
              I think I finally got it. Thank you guys, it is much appreciated. ... __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo!
              Message 6 of 6 , Apr 4 12:06 PM
                I think I finally got it. Thank you guys, it is much
                appreciated.

                --- Zachary Antilley <zantilley@...> wrote:

                > What you're wanting to do can be done, but it's not
                > as simple as just
                > dumping it all in to a variable and using one
                > command to display it.
                >
                > Your application may vary, but to display this in a
                > dialog window, the
                > below code will work;
                >
                > ---
                > usa$="United States of America"
                >
                > WindowWidth=640
                > WindowHeight=480
                > statictext #main.handle, usa$, 10, 10, 600, 40
                > 'places your USA text
                > statictext #main.handle1, "Some other text", 10, 50,
                > 600, 20 'Places
                > some other text with the default font
                > open "example" for window as #main
                > 'Opens the window
                > print #main.handle, "!font Times_New_Roman 25 bold
                > underscore"
                > 'Changes the font for the USA text
                > print #main, "trapclose [quit]"
                > wait
                >
                > [quit]
                > close #main
                > end
                > ---
                >
                > You can look in the help under How to Specify Fonts
                > for more information
                > on fonts.
                >
                > Hope this helps,
                >
                > Zack
                >
                >
                >
                >
                > ltdas181 wrote:
                >
                > >Assume that I want to take the phrase "United
                > States of America" and
                > >enlarge it, embolden it, underline it and assigne
                > it to a variable
                > >that I can now place in any window and in any place
                > within a program
                > >that I like. Can someone show me the coding that
                > would create this
                > >variable?
                > >
                > >
                > >
                > >
                > >
                > >
                > >Yahoo! Groups Links
                > >
                > >
                > >
                > >
                > >
                > >
                > >
                > >
                >


                __________________________________________________
                Do You Yahoo!?
                Tired of spam? Yahoo! Mail has the best spam protection around
                http://mail.yahoo.com
              Your message has been successfully submitted and would be delivered to recipients shortly.