none
TextWindow to GraphicsWindow RRS feed

  • Question

  • Hi again guys, almost finished with my first small basic project, but have yet another question...

    can I run my program from the graphics window? I have a background I would like to use but the textwindow and the graphics windows seem to be two different widows when I run the program from my computer.

    or

    can I add a pic to my text window?

    I guess I'm thinking, or hoping, it might be possible to incorporate one into the other. Sorry, I have not done much in the graphics window yet. Thanks again.

    Friday, March 15, 2013 5:33 PM

Answers

  • No, I'm sorry but you can't add a picture to the Textwindow.

    A spark to start a fire is necessary. But mainly you need dry kindling.



    Friday, March 15, 2013 6:10 PM
    Answerer
  • You should review the subcommands of the GraphicsWindow commands.

    You can write text on the GW with .DrawText but have to give the position where you want the text, so it is a little harder to write a number of lines of text on the graphics window.


    Jan [ WhTurner ] The Netherlands


    • Edited by WhTurner33Editor Friday, March 15, 2013 6:33 PM
    • Marked as answer by Acutth62 Wednesday, March 27, 2013 7:38 PM
    • Unmarked as answer by Acutth62 Wednesday, March 27, 2013 7:39 PM
    • Marked as answer by Acutth62 Wednesday, March 27, 2013 7:44 PM
    Friday, March 15, 2013 6:33 PM
    Answerer
  • Try this little program,  and experiment with changing the coordinates (x and y)

    GraphicsWindow.left=400
    GraphicsWindow.Top=100
    GraphicsWindow.DrawRectangle(10,10,130,20)
    GraphicsWindow.DrawBoundText(10,10,130,"ASDSDFBGJFJewghdhhtjhjjyjyj")
    GraphicsWindow.DrawRectangle(10,100,130,20)
    GraphicsWindow.DrawText(10,100,"ASDSDFBGJFJewghdhhtjhjjyjyj")
    


    Jan [ WhTurner ] The Netherlands

    Friday, March 15, 2013 6:56 PM
    Answerer
  • can I run my program (written in TextWindow) from the graphics window?

    No but Yes if you get creative.

    You can use the TextWindow from the GraphicsWindow. Run this and you will see what i mean.

    GraphicsWindow.DrawBoundText(10, 10, 200, "Using TextWindow from the GraphicsWindow")
    
    TextWindow.Show()
    TextWindow.WriteLine("this is a 5 sec flash")
    TextWindow.WriteLine("")
    TextWindow.WriteLine("Please Wait")
    Program.Delay(5000)
    TextWindow.Hide()
    
    Controls.ButtonClicked = onButtonClicked
    Controls.AddButton("Click to show textWindow", 50, 200)
    
    Sub onButtonClicked
      TextWindow.WriteLine("press enter to return to the GraphicsWindow")
      TextWindow.Read()
      TextWindow.Hide()
    EndSub
      

    You can then use TextWindows as popups and by adjusting the position of the TextWindow you can use them "to read and write" as if they were a working with the GraphicsWindow.

    Sadly there's no TextWindow.Width or Textwindow.Height property for the TextWindow object. You can adjust the size of the TextWindow on the console by dragging the windows edge and the automatic scrolling feature of the TextWindow allows for scrolling.

    Sunday, March 17, 2013 3:42 AM
    Moderator
  • you CAN use the graphics window as a background whileyou have a textwindow up, but they will be two seperate windows. and here is how to have pictures on a graphics window:

    image1 = "C:\Users\User\Documents\SMALL Files\Macron Logo.png"


    GraphicsWindow

    .DrawResizedImage(image1, 0, 0 ,650, 400)

    you would just have to change location of image, and all of that:)

    _____________________________________________________

    I am 13 and I love to hELp you! (:D) (:D) (:D) (D:)

    Sunday, March 17, 2013 8:01 PM
  • Thanks.

    • Marked as answer by Acutth62 Wednesday, March 27, 2013 7:38 PM
    Wednesday, March 27, 2013 7:36 PM
  • Thanks.
    • Marked as answer by Acutth62 Wednesday, March 27, 2013 7:44 PM
    Wednesday, March 27, 2013 7:43 PM

All replies

  • No, I'm sorry but you can't add a picture to the Textwindow.

    A spark to start a fire is necessary. But mainly you need dry kindling.



    Friday, March 15, 2013 6:10 PM
    Answerer
  • You should review the subcommands of the GraphicsWindow commands.

    You can write text on the GW with .DrawText but have to give the position where you want the text, so it is a little harder to write a number of lines of text on the graphics window.


    Jan [ WhTurner ] The Netherlands


    • Edited by WhTurner33Editor Friday, March 15, 2013 6:33 PM
    • Marked as answer by Acutth62 Wednesday, March 27, 2013 7:38 PM
    • Unmarked as answer by Acutth62 Wednesday, March 27, 2013 7:39 PM
    • Marked as answer by Acutth62 Wednesday, March 27, 2013 7:44 PM
    Friday, March 15, 2013 6:33 PM
    Answerer
  • It's much easier to use a TextWindow object when you have lotsa texts to display than a GraphicsWindow one.
    I believe one of the reasons is auto-scrolling and no much need to worry about where to place a text sentence on it.
    When you have yourself a worthy TextWindow-based program, you should think about converting it to a GUI for GraphicsWindow!
    However, you'll have to deal w/ text positioning everywhere! Plus, you'll have to create TextBoxes and Buttons to deal w/ user inputs from Controls object.

    Click on "Propose As Answer" if some post solves your problem or "Vote As Helpful" if some post has been useful to you! (^_^)

    Friday, March 15, 2013 6:33 PM
    Answerer
  • Try this little program,  and experiment with changing the coordinates (x and y)

    GraphicsWindow.left=400
    GraphicsWindow.Top=100
    GraphicsWindow.DrawRectangle(10,10,130,20)
    GraphicsWindow.DrawBoundText(10,10,130,"ASDSDFBGJFJewghdhhtjhjjyjyj")
    GraphicsWindow.DrawRectangle(10,100,130,20)
    GraphicsWindow.DrawText(10,100,"ASDSDFBGJFJewghdhhtjhjjyjyj")
    


    Jan [ WhTurner ] The Netherlands

    Friday, March 15, 2013 6:56 PM
    Answerer
  • can I run my program (written in TextWindow) from the graphics window?

    No but Yes if you get creative.

    You can use the TextWindow from the GraphicsWindow. Run this and you will see what i mean.

    GraphicsWindow.DrawBoundText(10, 10, 200, "Using TextWindow from the GraphicsWindow")
    
    TextWindow.Show()
    TextWindow.WriteLine("this is a 5 sec flash")
    TextWindow.WriteLine("")
    TextWindow.WriteLine("Please Wait")
    Program.Delay(5000)
    TextWindow.Hide()
    
    Controls.ButtonClicked = onButtonClicked
    Controls.AddButton("Click to show textWindow", 50, 200)
    
    Sub onButtonClicked
      TextWindow.WriteLine("press enter to return to the GraphicsWindow")
      TextWindow.Read()
      TextWindow.Hide()
    EndSub
      

    You can then use TextWindows as popups and by adjusting the position of the TextWindow you can use them "to read and write" as if they were a working with the GraphicsWindow.

    Sadly there's no TextWindow.Width or Textwindow.Height property for the TextWindow object. You can adjust the size of the TextWindow on the console by dragging the windows edge and the automatic scrolling feature of the TextWindow allows for scrolling.

    Sunday, March 17, 2013 3:42 AM
    Moderator
  • you CAN use the graphics window as a background whileyou have a textwindow up, but they will be two seperate windows. and here is how to have pictures on a graphics window:

    image1 = "C:\Users\User\Documents\SMALL Files\Macron Logo.png"


    GraphicsWindow

    .DrawResizedImage(image1, 0, 0 ,650, 400)

    you would just have to change location of image, and all of that:)

    _____________________________________________________

    I am 13 and I love to hELp you! (:D) (:D) (:D) (D:)

    Sunday, March 17, 2013 8:01 PM
  • Thanks.

    • Marked as answer by Acutth62 Wednesday, March 27, 2013 7:38 PM
    Wednesday, March 27, 2013 7:36 PM
  • Thanks.
    Wednesday, March 27, 2013 7:41 PM
  • Thanks.
    • Marked as answer by Acutth62 Wednesday, March 27, 2013 7:44 PM
    Wednesday, March 27, 2013 7:43 PM
  • thanks.
    Wednesday, March 27, 2013 7:43 PM
  • Thanks.
    Wednesday, March 27, 2013 7:43 PM
  • Thanks.
    Wednesday, March 27, 2013 7:43 PM