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

AW: [libertybasic] To mainwin, or not to mainwin (nomainwin)?

Expand Messages
  • pendl2megabit
    Message 1 of 7 , Jan 31, 2006
      >
      > Dear Liberty Basic,
      >
      > I am rewriting an educational program from Qbasic to Liberty
      > Basic. The program uses some menu screens that use large easy-to-see
      > type. The menu selections are numbered and activated using INKEY$.
      > The main part of the program is text centered and relies heavily on
      > LOCATE, so I need to use the Main Window for that part. I can't
      > adjust the font size in the Main Window to make large type, and I
      > can't use INKEY$ with a text window. My solution is to draw the large
      > letters in a graphics window where I can use INKEY$. My problem is
      > that the text portion of the program should not be displayed until the
      > user goes through several of the graphic window menus. Therefore, I
      > do not want to see any part of the Main Window until it's time for the
      > user to use the text that will appear in that window. I thought I
      > might use NOMAINWIN at the start of the program when I am displaying
      > the menus, then call up the Main Window with MAINWIN 80 40 later on,
      > but that doesn't seem to work. I also tried creating a very small
      > Main Window with MAINWIN 10 10, so that the menus would completely
      > cover it up, then later on, expanding its size with MAINWIN 80 40, but
      > that doesn't seem to work either. MAINWIN 10 10 creates a window that
      > is larger than the 640X480 graphics window I am using for the menus.
      > Any solutions? Thanks for your time.
      >
      > Richard Brewer

      Richard,
      the best way to simulate the QBASIC console window is to use a graphics GUI
      window.
      If you have once chosen to remove the main console window with NOMAINWIN,
      then there is no way to get it back.

      You can use a fixed font like "Courier New" and PLACE to get the
      functionality of the LOCATE command in a graphics window.

      Don't orget to put the pen DOWN directly after you opened the graphics
      window.
      In addition, there is no need to move the pen UP, when you use the PLACE
      command ;-D

      ---
      Stefan Pendl






      ___________________________________________________________
      Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
    • r2pbrewer
      Janet, Yes, it has to be a main window because of the heavy use of LOCATE to position text accurately. This program displays quizzes. One form is a match
      Message 2 of 7 , Feb 2, 2006
        Janet,

        Yes, it has to be a main window because of the heavy use of LOCATE
        to position text accurately. This program displays quizzes. One form
        is a match quiz with two columns of terms to be matched up. The
        second type is a cloze (fill in the blank). Accrute placement of the
        etxt with regard to cloumn and row is essential. Thanks for your time.

        Richard

        --- In libertybasic@yahoogroups.com, "JanetTerra" <janetterra@...> wrote:
        >
        > --- In libertybasic@yahoogroups.com, "r2pbrewer" <r2pbrewer@y...>
        > wrote:
        > >
        > > Dear Liberty Basic,
        > >
        > > I am rewriting an educational program from Qbasic to Liberty
        > > Basic. The program uses some menu screens that use large easy-to-
        > see
        > > type. The menu selections are numbered and activated using INKEY$.
        > > The main part of the program is text centered and relies heavily on
        > > LOCATE, so I need to use the Main Window for that part. I can't
        > > adjust the font size in the Main Window to make large type, and I
        > > can't use INKEY$ with a text window. My solution is to draw the
        > large
        > > letters in a graphics window where I can use INKEY$. My problem is
        > > that the text portion of the program should not be displayed until
        > the
        > > user goes through several of the graphic window menus. Therefore, I
        > > do not want to see any part of the Main Window until it's time for
        > the
        > > user to use the text that will appear in that window. I thought I
        > > might use NOMAINWIN at the start of the program when I am displaying
        > > the menus, then call up the Main Window with MAINWIN 80 40 later on,
        > > but that doesn't seem to work. I also tried creating a very small
        > > Main Window with MAINWIN 10 10, so that the menus would completely
        > > cover it up, then later on, expanding its size with MAINWIN 80 40,
        > but
        > > that doesn't seem to work either. MAINWIN 10 10 creates a window
        > that
        > > is larger than the 640X480 graphics window I am using for the
        > menus.
        > > Any solutions? Thanks for your time.
        > >
        > > Richard Brewer
        > >
        >
        > Does it have to be the main window? Could you open a window for text
        > when needed, or even imbed a texteditor into a regular window? That
        > way you can control both the size of the text window and the font
        > being displayed.
        > Janet
        >
      • bbjen@hotPOP.com
        ... Richard, No offfense intended, but you need more familiarity with LB. LOCATE in LB only means something in a graphics window. Stephan s suggestion to use
        Message 3 of 7 , Feb 2, 2006
          At 04:11 PM 2/2/06 -0000, you wrote:
          >Janet,
          >
          > Yes, it has to be a main window because of the heavy use of LOCATE
          >to position text accurately. This program displays quizzes. One form
          >is a match quiz with two columns of terms to be matched up. The
          >second type is a cloze (fill in the blank). Accrute placement of the
          >etxt with regard to cloumn and row is essential. Thanks for your time.
          >
          >Richard
          >--------------------------------------------

          Richard,

          No offfense intended, but you need more familiarity with LB. LOCATE in
          LB only means something in a graphics window.
          Stephan's suggestion to use a GUI window (graphics) is what you need if
          you want a non-fixed font.
          Janet's suggestion to use a text window is right on if you can use
          fixed font.

          See Newsletter 115, "Aligning numbers" demo for the non-fixed solution.

          Newsletters are at:
          http://groups.yahoo.com/group/lbnews/
          the official distribution point; there you can download the zip archive.
          You can also download it at the bottom of the main online page, here:
          http://babek.info/libertybasicfiles/lbnews/

          Bill J.
        • pendl2megabit
          Message 4 of 7 , Feb 3, 2006
            >
            > Richard,
            >
            > No offfense intended, but you need more familiarity with LB.
            > LOCATE in
            > LB only means something in a graphics window.
            > Stephan's suggestion to use a GUI window (graphics) is what
            > you need if
            > you want a non-fixed font.
            > Janet's suggestion to use a text window is right on if you can use
            > fixed font.
            >
            > See Newsletter 115, "Aligning numbers" demo for the non-fixed solution.
            >
            > Newsletters are at:
            > http://groups.yahoo.com/group/lbnews/
            > the official distribution point; there you can download the
            > zip archive.
            > You can also download it at the bottom of the main online page, here:
            > http://babek.info/libertybasicfiles/lbnews/
            >
            > Bill J.

            Bill,
            sorry that I have to correct you, but there are two types of LOCATE since
            LB3.03 ;-D

            1) position controls in windows
            2) position the cursor in the mainwindow

            Richard wants full control over colours, text positions and fonts, he should
            switch to use a graphics GUI window.
            A text window won't allow you to mix fonts, this is only supported in
            graphics windows.

            ---

            Richard,
            you can use COLOR and BACKCOLOR in a graphics window to control colours.
            You can use PLACE to indicate the starting position of any object (text,
            circle, etc.).
            You can use FONT to change the font for the next text object printed to the
            window.

            Check out the helpfile topic "Graphics Commands" for more info on this.

            Anyone who wants the full QBASIC console functionality has to use a graphics
            window, there is no other way yet :-(

            ---
            Stefan Pendl






            ___________________________________________________________
            Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
          • bbjen@hotPOP.com
            ... Thanks, Stafan, I ve never used Locate in the mainwindow, so forgot that it existed. Always glad to be brought up to speed. Bill J.
            Message 5 of 7 , Feb 3, 2006
              At 09:18 AM 2/3/06 +0100, you wrote:
              >Bill,
              > sorry that I have to correct you, but there are two types of LOCATE since
              >LB3.03 ;-D
              >
              >1) position controls in windows
              >2) position the cursor in the mainwindow
              >----------------------------------------------
              Thanks, Stafan,
              I've never used Locate in the mainwindow, so forgot that it existed.
              Always glad to be brought up to speed.
              Bill J.
            Your message has been successfully submitted and would be delivered to recipients shortly.