none
textwindow right margin RRS feed

Answers

  • To place a TW by right margin, you would need it's whole width in [pixels] and then place it with TextWindow.Left

    see ID: LJZ753-0  (needs LitDev extension)

    PS: There are also 2 properties to Get/Set its width by columns and the height by lines.



    Wednesday, July 5, 2017 3:49 PM
    Answerer
  • Roger,

    If you type in: TextWindow.show() in small basic Gui Window and run it the text window will open. Then goto the top of the window and right click. Then go down to defaults or properties and click that will open the console properties window. From there select layout. Here you can change the textwindow size and position. If you have selected defaults these changes will stay until you change them again. Changing width changes how many characters you can type in the window, which effectively moves the right position of the textwindow.


    JR

    Wednesday, July 5, 2017 9:42 PM
    Answerer

All replies

  • To place a TW by right margin, you would need it's whole width in [pixels] and then place it with TextWindow.Left

    see ID: LJZ753-0  (needs LitDev extension)

    PS: There are also 2 properties to Get/Set its width by columns and the height by lines.



    Wednesday, July 5, 2017 3:49 PM
    Answerer
  • Roger,

    If you type in: TextWindow.show() in small basic Gui Window and run it the text window will open. Then goto the top of the window and right click. Then go down to defaults or properties and click that will open the console properties window. From there select layout. Here you can change the textwindow size and position. If you have selected defaults these changes will stay until you change them again. Changing width changes how many characters you can type in the window, which effectively moves the right position of the textwindow.


    JR

    Wednesday, July 5, 2017 9:42 PM
    Answerer
  • Roger, I'm not sure this is your solution.  But following steps can change TextWindow width.

    1. Write a program with TextWindow.Pause() at the top.  Sample:

    scale = "----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8"
    While "True"
      TextWindow.Pause()
      TextWindow.WriteLine(scale)
    EndWhile

    2. Run the program and select a menu "Properties", "Layout" and change "Width" of "Screen Buffer Size".

    Screen shot of the Properties menu of TextWindow

    3. Hit any key in TextWindow to pass through the pause operation.

    Screen shot of a TextWindow with 40 columns


    Nonki Takahashi


    Monday, July 10, 2017 2:01 AM
    Moderator
  • With:

    PS: There are also 2 properties to Get/Set its width by columns and the height by lines.

    i meant, the included properties SBTW.Width and SBTW.Height (in LJZ753-0) which are GET/SET  , but did'nt use them as the question was about right margin. But to set TW width and/or height  also , simply use

    LDInline.Set("SBTW.Width", newW)

    LDInline.Set("SBTW.Height", newH)

    or ID: LJZ753-1 (simply answer 1st question with 'n' and  the 2nd question with 'y')

    the Buffersize will then also be increased automatically.

    Monday, July 10, 2017 10:50 AM
    Answerer
  • CSExt()
    LDInline.IncludeCS(cs, "","")

    I presume that the above two lines act on a program in
    an SB library.  I am new enough to SB to need instruction
    on how to do so.

    When I simply run your program LIZ753-0 as is I get 
    'Cannot find object LDInline'

    Please advise.

    Roger Jacques

    Wednesday, July 12, 2017 6:59 AM
  • For commands which start with LD... you need the Litdev extension, see https://blogs.msdn.microsoft.com/smallbasic/2012/10/12/small-basic-extensions-gallery/

    onder L for explanation and download.


    Jan [ WhTurner ] The Netherlands

    Wednesday, July 12, 2017 8:56 AM
    Answerer
  • I added a link in my first reply above (where you can download LitDev extension, read install instructions and overview)
    Wednesday, July 12, 2017 10:39 AM
    Answerer
  • Thank you.  With LitDev I will be able to do much more than to be

    "right marginally."


    Roger Jacques

    Wednesday, July 12, 2017 11:18 PM
  • With LitDev installed, I can impose a right margin, but will all other

    users of my program have to install the LitDev extension on their version

    of Small Basic as well?  This rather limits my potential audience, just to

    attain the slight feature of a right margin that doesn't impose itself on an 

    adjacent GraphicWindow to its right.


    Roger Jacques

    Monday, July 17, 2017 4:58 AM
  • If the textwindow and the graphicswindow overlap, you can adjust their positions on the display with e.g. TextWindow.Left=0 and GraphicsWindow.Left=500 

    Jan [ WhTurner ] The Netherlands

    Tuesday, July 18, 2017 10:41 AM
    Answerer