none
Small Basic : Removing shapes RRS feed

  • Question

  • Hi Team,

    How to remove shapes permanently?

    I used the following code to debug it.

    Shape = Shapes.AddRectangle(100,100)
    TextWindow.Show()
    TextWindow.WriteLine("pass 1 = " + Shape)
    Program.Delay(10000)
    Shapes.Remove(Shape)
    TextWindow.WriteLine("pass 2 = " + Shape)

    Thanks,


    Roshan - 7th Grade Student (Age 12) - Learning Small Basic, Visual Basic and C#

    Friday, January 12, 2018 12:50 PM

Answers

  • I suspect the shape is removed, but the name stays. You can remove that by Shape="".

    The other way around: If after creation you do:  shape="" , the name is no longer there, but the shape stays in the GrraphicsWindow.


    Jan [ WhTurner ] The Netherlands

    Friday, January 12, 2018 1:41 PM
    Answerer
  • Hi Team,

    How to remove or hide a shape created by the GraphicsWindow object.

    For example, GraphicsWindow.FillRectangle(0,0,100,100)

    Thanks,


    Roshan - 7th Grade Student (Age 12) - Learning Small Basic, Visual Basic and C#

    The Fill... and Draw... are not what we call Shapes (i.e. movable etc).  For the Fill and Draw operations you can only draw over the top to remove them, or GraphicsWIndow.Clear().to reset everything, shapes and drawing.

    See this for more info

    https://social.technet.microsoft.com/wiki/contents/articles/15059.small-basic-graphicswindow-basics.aspx

    Friday, January 12, 2018 6:39 PM
    Moderator

All replies

  • I suspect the shape is removed, but the name stays. You can remove that by Shape="".

    The other way around: If after creation you do:  shape="" , the name is no longer there, but the shape stays in the GrraphicsWindow.


    Jan [ WhTurner ] The Netherlands

    Friday, January 12, 2018 1:41 PM
    Answerer
  • Hi Team,

    How to remove or hide a shape created by the GraphicsWindow object.

    For example, GraphicsWindow.FillRectangle(0,0,100,100)

    Thanks,


    Roshan - 7th Grade Student (Age 12) - Learning Small Basic, Visual Basic and C#

    Friday, January 12, 2018 3:56 PM
  • Hi Team,

    How to remove or hide a shape created by the GraphicsWindow object.

    For example, GraphicsWindow.FillRectangle(0,0,100,100)

    Thanks,


    Roshan - 7th Grade Student (Age 12) - Learning Small Basic, Visual Basic and C#

    The Fill... and Draw... are not what we call Shapes (i.e. movable etc).  For the Fill and Draw operations you can only draw over the top to remove them, or GraphicsWIndow.Clear().to reset everything, shapes and drawing.

    See this for more info

    https://social.technet.microsoft.com/wiki/contents/articles/15059.small-basic-graphicswindow-basics.aspx

    Friday, January 12, 2018 6:39 PM
    Moderator