locked
Button icon RRS feed

  • Question

  • Hello guys i wanna add a icon some button in my program

    can make this ? is it possible ? or not ?

    Friday, February 13, 2015 5:09 PM

Answers

  • Your choices are:

    1] Use the Control Button without an icon on it (just text)

    2] Use a Small Basic extension to put an image on the button

    3] Put an image icon on the GraphicsWindow, and handle the coordinates to where the user clicks and treat this as the button.

    • Marked as answer by MehmetTR Friday, February 13, 2015 8:10 PM
    • Unmarked as answer by MehmetTR Friday, February 13, 2015 8:10 PM
    • Proposed as answer by Nonki Takahashi Saturday, February 14, 2015 6:03 AM
    • Marked as answer by Nonki Takahashi Sunday, February 22, 2015 9:46 AM
    Friday, February 13, 2015 6:19 PM
  • Example for my LitDev extension which downloads an image, saves it, resizes it and puts it on a button.

    button = Controls.AddButton("TEST",50,50) 
    LDUtilities.FixFlickr() 'To fix a bug to usethe Flickr object 
    image = ImageList.LoadImage(Flickr.GetRandomPicture("Car")) 'Save an image downloaded from Flickr (takes a second or 2) 
    LDImage.Resize(image,100,100) 'Resize the image 
    LDShapes.SetImage(button,image) 'Apply to button
    
    Controls.ButtonClicked = OnButtonClicked
    
    Sub OnButtonClicked
      GraphicsWindow.BackgroundColor = GraphicsWindow.GetRandomColor()
    EndSub


    • Proposed as answer by Nonki Takahashi Saturday, February 14, 2015 6:02 AM
    • Edited by litdev Sunday, February 15, 2015 9:38 PM
    • Marked as answer by Nonki Takahashi Sunday, February 22, 2015 9:46 AM
    Friday, February 13, 2015 9:43 PM

All replies

  • Your choices are:

    1] Use the Control Button without an icon on it (just text)

    2] Use a Small Basic extension to put an image on the button

    3] Put an image icon on the GraphicsWindow, and handle the coordinates to where the user clicks and treat this as the button.

    • Marked as answer by MehmetTR Friday, February 13, 2015 8:10 PM
    • Unmarked as answer by MehmetTR Friday, February 13, 2015 8:10 PM
    • Proposed as answer by Nonki Takahashi Saturday, February 14, 2015 6:03 AM
    • Marked as answer by Nonki Takahashi Sunday, February 22, 2015 9:46 AM
    Friday, February 13, 2015 6:19 PM
  • Your choices are:

    1] Use the Control Button without an icon on it (just text)

    2] Use a Small Basic extension to put an image on the button

    3] Put an image icon on the GraphicsWindow, and handle the coordinates to where the user clicks and treat this as the button.


    2] Which Plugin i can use ?

    • Edited by MehmetTR Friday, February 13, 2015 8:11 PM
    Friday, February 13, 2015 8:11 PM
  • Example for my LitDev extension which downloads an image, saves it, resizes it and puts it on a button.

    button = Controls.AddButton("TEST",50,50) 
    LDUtilities.FixFlickr() 'To fix a bug to usethe Flickr object 
    image = ImageList.LoadImage(Flickr.GetRandomPicture("Car")) 'Save an image downloaded from Flickr (takes a second or 2) 
    LDImage.Resize(image,100,100) 'Resize the image 
    LDShapes.SetImage(button,image) 'Apply to button
    
    Controls.ButtonClicked = OnButtonClicked
    
    Sub OnButtonClicked
      GraphicsWindow.BackgroundColor = GraphicsWindow.GetRandomColor()
    EndSub


    • Proposed as answer by Nonki Takahashi Saturday, February 14, 2015 6:02 AM
    • Edited by litdev Sunday, February 15, 2015 9:38 PM
    • Marked as answer by Nonki Takahashi Sunday, February 22, 2015 9:46 AM
    Friday, February 13, 2015 9:43 PM
  • Thanks :) Very Helpful
    • Edited by MehmetTR Saturday, February 14, 2015 12:11 PM
    Saturday, February 14, 2015 12:05 PM