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

Re: [libertybasic] check box [set] and [reset]

Expand Messages
  • John Davidson
    Try this: nomainwin WindowWidth = 200 WindowHeight = 210 UpperLeftX=int((DisplayWidth-WindowWidth)/2) UpperLeftY=int((DisplayHeight-WindowHeight)/2)
    Message 1 of 17 , Oct 31, 2001
    • 0 Attachment

       Try this:


          nomainwin
          WindowWidth = 200
          WindowHeight = 210
          UpperLeftX=int((DisplayWidth-WindowWidth)/2)
          UpperLeftY=int((DisplayHeight-WindowHeight)/2)
          BackgroundColor$ = "buttonface"
          ForegroundColor$ = "black"


          statictext #main,"Results:",  10,130,75,20
          textbox  #main.results,95,130, 40, 20

          checkbox #main.checkbox1, "  +/-1", [checkbox1Set], [checkbox1Reset], 95,40,100, 20
          checkbox #main.checkbox2, "+/- 10", [checkbox2Set], [checkbox2Reset], 95,70,100, 20
          checkbox #main.checkbox3, "+/-100", [checkbox3Set], [checkbox3Reset], 95,100,100, 20

          open "untitled" for window as #main
           print #main, "trapclose [quit]"


      [main.inputLoop]
          wait
          goto [main.inputLoop]

      [checkbox1Set]
          results=results+1
          print #main.results,results
          goto [main.inputLoop]

      [checkbox1Reset]
          results=results-1
         print #main.results,results
         goto [main.inputLoop]

      [checkbox2Set]
          results=results+10
          print #main.results,results
          goto [main.inputLoop]

      [checkbox2Reset]

             results=results-10
             print #main.results,results
          goto [main.inputLoop]

      [checkbox3Set]
          results=results+100
          print #main.results,results

          goto [main.inputLoop]


      [checkbox3Reset]   '
             results=results-100
             print #main.results,results

          goto [main.inputLoop]

      [quit]

           close #main
           end

      John

        Chergarj@... wrote:

      I am confused as hell about how the limited choices of [set] and [reset] can be used to allow various checkboxes to mean their own individual thing.  If you have more than one check box, and someone can either set or reset each, how does each checkbox have a meaning different from all the other check boxes which might be present?  

      Could someone create a simple model program which contains 3 checkboxes in one window to show that each checkbox can mean something specific, each distinguishable from all of the other checkboxes?

      G C


      To unsubscribe from this group, send an email to:
      libertybasic-unsubscribe@egroups.com



      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



      Do You Yahoo!?
      Make a great connection at Yahoo! Personals.

    • Marc
      I wanted to ask if loaded visible bmps that do not move against the background need to be made into masks. Thanks, Marc
      Message 2 of 17 , May 11, 2009
      • 0 Attachment
        I wanted to ask if loaded visible bmps that do not move against the background need to be made into masks.
        Thanks,
        Marc
      • Bill Lopez
        Why don t you try it, Marc? I guarantee you will not explode your computer! Besides, images are fun! [Non-text portions of this message have been removed]
        Message 3 of 17 , May 11, 2009
        • 0 Attachment
          Why don't you try it, Marc? I guarantee you will not explode your computer! Besides, images are fun!



          [Non-text portions of this message have been removed]
        • Gordon Rahman
          If you draw (using drawbmp etc.) a bmp then you don t need to mask it. If you make a sprite (using addsprite etc.) then you need a mask and a background .
          Message 4 of 17 , May 11, 2009
          • 0 Attachment
            If you draw (using "drawbmp etc.)
            a bmp then you don't need to mask it.
            If you make a sprite (using "addsprite etc.)
            then you need a mask and a "background".

            Try it out to find out if refreshing the
            screen with "drawsprites" will overwrite
            your drawn bmp.

            Good luck and pleasant programming.

            Gordon


            --- In libertybasic@yahoogroups.com, "Marc" <mrossi8888@...> wrote:
            >
            > I wanted to ask if loaded visible bmps that do not move against the background need to be made into masks.
            > Thanks,
            > Marc
            >
          • Stefan Pendl
            ... What are you trying to do? There is no need for a mask, if the image is not a sprite. ... Stefan Pendl Liberty BASIC Assist 4.03 ........
            Message 5 of 17 , May 11, 2009
            • 0 Attachment
              >
              > I wanted to ask if loaded visible bmps that do not move
              > against the background need to be made into masks.

              What are you trying to do?

              There is no need for a mask, if the image is not a sprite.

              ---
              Stefan Pendl

              Liberty BASIC Assist 4.03 ........ http://www.libertybasic.com/assist.html
              Liberty BASIC 4.04 public beta ... http://www.libertybasic.com/lb404b3setup.exe

              Windows Vista Home Premium 32-bit SP1
              AMD Turion X2 RM-70 2GHz
              4GB RAM
            • Marc Rossi
              Hi Stefan, I just want to load and use bmp s.  I don t want them to move or go along the background. I cannot get them to load or display.  I use LOADBMP and
              Message 6 of 17 , May 12, 2009
              • 0 Attachment
                Hi Stefan,
                I just want to load and use bmp's.  I don't want them to move or go along the background.
                I cannot get them to load or display.  I use LOADBMP and DRAWBMP but they do not show up
                Thanks,
                Marc

                --- On Tue, 5/12/09, Stefan Pendl <pendl2megabit@...> wrote:

                From: Stefan Pendl <pendl2megabit@...>
                Subject: RE: [libertybasic] bmps
                To: libertybasic@yahoogroups.com
                Date: Tuesday, May 12, 2009, 2:11 AM








                >
                > I wanted to ask if loaded visible bmps that do not move
                > against the background need to be made into masks.

                What are you trying to do?

                There is no need for a mask, if the image is not a sprite.

                ---
                Stefan Pendl

                Liberty BASIC Assist 4.03 ........ http://www.libertyb asic.com/ assist.html
                Liberty BASIC 4.04 public beta ... http://www.libertyb asic.com/ lb404b3setup. exe

                Windows Vista Home Premium 32-bit SP1
                AMD Turion X2 RM-70 2GHz
                4GB RAM



















                [Non-text portions of this message have been removed]
              • Gordon Rahman
                Oh.... I think that your pen is still up. Place it on the paper with the command down Now draw your bmp with drawbmp xxx Gordon
                Message 7 of 17 , May 12, 2009
                • 0 Attachment
                  Oh.... I think that your pen is still up.
                  Place it on the "paper" with the command
                  "down"
                  Now draw your bmp with
                  "drawbmp xxx"

                  Gordon



                  --- In libertybasic@yahoogroups.com, Marc Rossi <mrossi8888@...> wrote:
                  >
                  > Hi Stefan,
                  > I just want to load and use bmp's.  I don't want them to move or go along the background.
                  > I cannot get them to load or display.  I use LOADBMP and DRAWBMP but they do not show up
                  > Thanks,
                  > Marc
                  >
                  > --- On Tue, 5/12/09, Stefan Pendl <pendl2megabit@...> wrote:
                  >
                  > From: Stefan Pendl <pendl2megabit@...>
                  > Subject: RE: [libertybasic] bmps
                  > To: libertybasic@yahoogroups.com
                  > Date: Tuesday, May 12, 2009, 2:11 AM
                  >
                  >
                  >
                  >
                  >
                  >
                  >
                  >
                  > >
                  > > I wanted to ask if loaded visible bmps that do not move
                  > > against the background need to be made into masks.
                  >
                  > What are you trying to do?
                  >
                  > There is no need for a mask, if the image is not a sprite.
                  >
                  > ---
                  > Stefan Pendl
                  >
                  > Liberty BASIC Assist 4.03 ........ http://www.libertyb asic.com/ assist.html
                  > Liberty BASIC 4.04 public beta ... http://www.libertyb asic.com/ lb404b3setup. exe
                  >
                  > Windows Vista Home Premium 32-bit SP1
                  > AMD Turion X2 RM-70 2GHz
                  > 4GB RAM
                  >
                  >
                  >
                  >
                  >
                  >
                  >
                  >
                  >
                  >
                  >
                  >
                  >
                  >
                  >
                  >
                  >
                  >
                  >
                  > [Non-text portions of this message have been removed]
                  >
                • Stefan Pendl
                  ... As Gordon says, the DOWN graphics method is mandatory. See the graphics area like a piece of paper, you need to put the pen down on the paper to
                  Message 8 of 17 , May 12, 2009
                  • 0 Attachment
                    >
                    > Oh.... I think that your pen is still up.
                    > Place it on the "paper" with the command
                    > "down"
                    > Now draw your bmp with
                    > "drawbmp xxx"
                    >

                    As Gordon says, the DOWN graphics method is mandatory.

                    See the graphics area like a piece of paper, you need to put the pen down on the paper to successfully draw on it.

                    To display images you need to following procedure:

                    1) LOADBMP
                    2) OPEN graphics
                    3) pen DOWN
                    4) DRAWBMP
                    5) FLUSH (to glue the image on the paper)

                    ---
                    Stefan Pendl

                    Liberty BASIC Assist 4.03 ........ http://www.libertybasic.com/assist.html
                    Liberty BASIC 4.04 public beta ... http://www.libertybasic.com/lb404b3setup.exe

                    Windows Vista Home Premium 32-bit SP1
                    AMD Turion X2 RM-70 2GHz
                    4GB RAM
                  • Marc
                    Thanks. My pen wasn t down. First time I worked with bmps. Marc
                    Message 9 of 17 , May 13, 2009
                    • 0 Attachment
                      Thanks. My pen wasn't down. First time I worked with bmps.
                      Marc
                    Your message has been successfully submitted and would be delivered to recipients shortly.