none
Graphics Window Buttons

    Question

  • Hey Internet,

    I was wondering if anyone knew how to make buttons that either A) initiate a text program, B) make a new Graphics window. Like making another window but a different color.

    If anyone knows the best place to look for this or point me in the right direction I would very much like that.

    Also if anyone knows shortcuts that is greatly appreciated as well.

    Thanks a lot,

    TurtleZebra

    Tuesday, March 14, 2017 9:57 PM

Answers

  • TurtleZebra,

    In the standard "Small Basic" only one GraphicsWindow can be opened. If you load an extension (LitDev Extension) it allows you to open multiple GraphicsWindows. It is possible to open a TextWindow. Here's a simple program that will do that.

    MyButton=Controls.AddButton("Open Text Window",20,20)
    Controls.buttonclicked=OnButtonClicked

    Sub OnButtonClicked
      TextWindow.Show()
      EndSub


    JR

    • Proposed as answer by litdevModerator Tuesday, March 14, 2017 10:55 PM
    • Marked as answer by TurtleZebra Thursday, March 16, 2017 9:34 PM
    Tuesday, March 14, 2017 10:37 PM
    Answerer

All replies

  • TurtleZebra,

    In the standard "Small Basic" only one GraphicsWindow can be opened. If you load an extension (LitDev Extension) it allows you to open multiple GraphicsWindows. It is possible to open a TextWindow. Here's a simple program that will do that.

    MyButton=Controls.AddButton("Open Text Window",20,20)
    Controls.buttonclicked=OnButtonClicked

    Sub OnButtonClicked
      TextWindow.Show()
      EndSub


    JR

    • Proposed as answer by litdevModerator Tuesday, March 14, 2017 10:55 PM
    • Marked as answer by TurtleZebra Thursday, March 16, 2017 9:34 PM
    Tuesday, March 14, 2017 10:37 PM
    Answerer
  • Thank you JR. I realized that what I should do is a clear function so that it can look like a new screen.

    Thank you for all of that information.

    Wednesday, March 15, 2017 9:06 PM