Recent

Author Topic: project window  (Read 2878 times)

hamza

  • Jr. Member
  • **
  • Posts: 52
project window
« on: May 02, 2015, 12:45:53 pm »
hi

when i make a new project (new project>>application>>)the first screen( project window) will be white.
my question is: can I add a picture instead on white screen without adding Timage (like theam) because i have complete project with white screen and its not easy to add Timage then but the components again.

Blaazen

  • Hero Member
  • *****
  • Posts: 3237
  • POKE 54296,15
    • Eye-Candy Controls
Re: project window
« Reply #1 on: May 02, 2015, 12:56:37 pm »
You can paint the image in OnPaint event of the form.

Code: [Select]
Canvas.Draw(X, Y, ...);
EDIT: If your form is sizable, you can use
Code: [Select]
Canvas.StretchDraw();
EDIT2: However, adding TImage does require to remove all components and add them again. It is just TGraphicControl. It should be possible to add it, anchor it to form and change its Z-order (Move to Back).
« Last Edit: May 02, 2015, 01:02:18 pm by Blaazen »
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

hamza

  • Jr. Member
  • **
  • Posts: 52
Re: project window
« Reply #2 on: May 02, 2015, 02:47:43 pm »
the idea of TGraphicControl. is good but i did not find it ????how to find that??do i need new library??

Blaazen

  • Hero Member
  • *****
  • Posts: 3237
  • POKE 54296,15
    • Eye-Candy Controls
Re: project window
« Reply #3 on: May 02, 2015, 02:52:11 pm »
No, I meant that TImage is derived from TGraphicControl (TImage <- TCustomImage <- TGraphicControl).

Just try put TImage on the form, anchor it to the form and right-click on it, select Z-order -> Move to back. It should work.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

hamza

  • Jr. Member
  • **
  • Posts: 52
Re: project window
« Reply #4 on: May 02, 2015, 02:57:40 pm »
thank you, it is working now  :D

 

TinyPortal © 2005-2018