I need some advice on how to handle images in a TSrcollBox control. What I
want to achieve is something similar to the how Windows manages images when
View/Icons is selected in Explorer. In other words, I want to be able to
drag icons (actually TBtnBmp controls), show the large I beam and when
dropped, have the existing icons rearranged.
I am using TBtnBmp inside the TScrollBox because I need a text label *and*
an image. Each image and label combination represents a record that the user
wants to work with for a session. These images are restored to the last
active list when the application is restarted.
Thanks,
Andy
In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Managing TScollBox Images
Managing TScollBox Images
Andy,
there is nothing special in TScrollBox, excepting that the contained
controls coordinates are relatives to the ( ::nClientLeft, ::nClientTop )
point of the scrollbox. This point can be ( 0, 0 ) or negative values.
Xailer manages ::nClientWidth and ::nClientHeight based upon the contained
controls position and size, and thus, the scrollbars are updated to reflect
it.
In conclusion, you have to place the buttons into the scrollbox in a normal
way, although their coordinates were longer than the scrollbox size. I.e.,
suppose a 100x100 pixels clientsize scrollbox, and a set of 45x45 buttons;
you could place them at (5,5), (50,5), (5,50), (50,50), (5,100), (50,100),
(5,150), (50,150), and so on.
--
Regards,
Jose F. Gimenez
there is nothing special in TScrollBox, excepting that the contained
controls coordinates are relatives to the ( ::nClientLeft, ::nClientTop )
point of the scrollbox. This point can be ( 0, 0 ) or negative values.
Xailer manages ::nClientWidth and ::nClientHeight based upon the contained
controls position and size, and thus, the scrollbars are updated to reflect
it.
In conclusion, you have to place the buttons into the scrollbox in a normal
way, although their coordinates were longer than the scrollbox size. I.e.,
suppose a 100x100 pixels clientsize scrollbox, and a set of 45x45 buttons;
you could place them at (5,5), (50,5), (5,50), (50,50), (5,100), (50,100),
(5,150), (50,150), and so on.
--
Regards,
Jose F. Gimenez