Results 1 to 4 of 4

Thread: image button control exists?

  1. #1

    image button control exists + transparence ?

    http://www.thinbasic.com/community/s...8057#post88057

    a) next simple question if there's a chance with current thinbasic beta issue how to set a "picture (image)" on a button control. is there's any way for it? I have to create an image list for it? any example or link or info here at the board?

    b) according to an example from ui folder/canvas/ with LIVEIMAGE or Imagebackground (the timer example with the cat and green and red point on gui) I have another question how to set the background for an image to "transparent" ? the image background for that example is a simple string (sImagebackground) and is setting by a usual canvas control. But if I move a picture over another one there are pixel artefacts (streams). I think it belongs to the background that should have same color as my font example has shown with foreground/background rgb's. but an image by loading from a string has no foreground/background colour nor the canvas control I suppose I have to change clear canvas color(rgb(a,b,c),rgb(a,b,c) for it. but how?

    bye, largo
    Last edited by largo_winch; 01-03-2013 at 12:35.

  2. #2
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Hi Largo,

    there is such a control - it is called XPButton and there are examples for it in /thinBasic/SampleScripts/UI/XPButton/.

    But it seems the example does not work with ThinBASIC 1.9.3.0, I have made a report so Eros can have a look at the issue.

    I am sorry, please stay tuned!


    Petr

    P.S. Maybe you could use Toolbar in the meanwhile
    Last edited by Petr Schreiber; 01-03-2013 at 12:33.
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  3. #3
    thanks petr, can you have please a look at my second part of question "b)"

  4. #4
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Hi Largo,

    the drawing of masked images is handled by RenderImageToExistingCanvasWithMaskedColor ( ) function in the live_image.tBasic example.
    It works on simple principle - it makes all pixels of specified color transparent.

    Do you think you could attach script demonstrating the problems you observe? I am not sure I understand the explanation fully.


    Thanks,
    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

Similar Threads

  1. time line control exists ?
    By Lionheart008 in forum TBGL General
    Replies: 1
    Last Post: 11-01-2011, 19:30
  2. Finally an Image Control
    By ErosOlmi in forum thinBasic vaporware
    Replies: 5
    Last Post: 08-11-2008, 22:29
  3. script control of button
    By sandyrepope in forum User Interface scripts
    Replies: 4
    Last Post: 10-08-2007, 23:30

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •