Recent

Author Topic: Transparency on TImage and bring to front?  (Read 453 times)

Tony Stone

  • New Member
  • *
  • Posts: 14
Transparency on TImage and bring to front?
« on: April 24, 2021, 02:21:07 pm »
I am trying to use a TImage object on my main form to display over all of the other components which are anchored to the form(panels,toolbar etc...).  But I cannot get the image to come to the front.

I am trying to display the made with Lazarus logo for about 5 seconds and I want it to fade away when my form initially loads.  I am getting the feeling I cannot make it fade away because i cant seem to find any tranparency options.  But I would be happy with skipping the fade away thing for now....  how can i bring it to the front of all components that are anchored to the form?

lucamar

  • Hero Member
  • *****
  • Posts: 4024
Re: Transparency on TImage and bring to front?
« Reply #1 on: April 24, 2021, 03:08:12 pm »
Put it on a panel or other container and bring that container to the front. Though that might mess up the other controls a little, depending on how they are anchored.

Alternatively, put it on its own "on-top" form, though that might not be easily faded-out on all platforms.
« Last Edit: April 24, 2021, 03:09:51 pm by lucamar »
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

jamie

  • Hero Member
  • *****
  • Posts: 4587
Re: Transparency on TImage and bring to front?
« Reply #2 on: April 24, 2021, 04:52:43 pm »
If you are doing this with windows only I can present something that will give you that effect but other widgets I can not say...

In windows  there is a transparent window with alpha channel where you can adjust the transparency in a look if you wish..

I never have used it in such a way you are trying but I am sure it can be made to work..
The only true wisdom is knowing you know nothing

Handoko

  • Hero Member
  • *****
  • Posts: 4292
  • My goal: build my own game engine using Lazarus
Re: Transparency on TImage and bring to front?
« Reply #3 on: April 24, 2021, 06:15:34 pm »
Sorry for not really answering the OP's question.

But if one wants to make simple but good looking image animation or transition effect, you can try glSlideshow. It is not a ready-to-use component but with some modifications it can be used in your project.
https://forum.lazarus.freepascal.org/index.php/topic,35313.msg256719.html#msg256719

Or maybe a login screen with some simple effects:
https://forum.lazarus.freepascal.org/index.php/topic,37943.msg256549.html#msg256549

Soner

  • Full Member
  • ***
  • Posts: 238
Re: Transparency on TImage and bring to front?
« Reply #4 on: April 24, 2021, 06:57:41 pm »
Look at the solutions in this topic:
https://forum.lazarus.freepascal.org/index.php/topic,42107.0.html

You want to do something similiar.

 

TinyPortal © 2005-2018