Re: How to move an image (like an icon) quickly around the screen?
Posted by
Louis LaBrunda on
Oct 10, 2016; 3:40pm
URL: https://forum.world.st/How-to-move-an-image-like-an-icon-quickly-around-the-screen-tp4917636p4918562.html
I take back what I said about the label always having a border. It seems the
CwOverrideShell is what always has a border and it isn't windows fault.
The VA Smalltalk code that creates the popup tells windows to give it a border. I think this is a bug/feature and will have more to say about it in another thread.
For now I'm working on how to make the popup transparent. I can get the icon and the label it is in to be transparent but the underlying popup window/shell seems to have a background that isn't transparent. As always, I'm open to ideas.
Lou
On Tuesday, October 4, 2016 at 9:20:40 AM UTC-4, Louis LaBrunda wrote:
Well, I have solved the speed problem at the cost of the icon being painted in a rectangle with a border and losing the transparent part of the icon. I use a popup window to hold a label that displays the icon with code like this:
BombIcon := self bombIcon.
BombPopup := CwOverrideShell
createPopupShell: 'Popup Bomb'
parent: Transcript mainWindow
argBlock: [:w | w width: BombIcon width; height: BombIcon height].
cell := BombPopup createLabel: 'The Bomb' argBlock: [:w |
w borderWidth: 0; labelType: CwConstants::XmICON; height: BombIcon height; width: BombIcon width.
].
cell labelIcon: BombIcon; manageChild.
BombPopup centerOnScreen.
BombPopup popup.
The label is a windows widget and always has a border even if border is set to 0. So, I need to replace the label with some other graphic than can display the icon the way I want. Hopefully that's possible. Again any ideas are very much appreciated.
Lou
On Friday, September 30, 2016 at 12:25:42 PM UTC-4, Louis LaBrunda wrote:
Hi Guys and Gals,
Does anyone have any hints as to moving an image like an icon around the screen? I can do it but refreshing the screen under the image as it moves is very slow. I would also like the transparency area of the image to be respected. Any ideas are very much appreciated, thanks in advance.
Lou
--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
[hidden email].
To post to this group, send email to
[hidden email].
Visit this group at
https://groups.google.com/group/va-smalltalk.
For more options, visit
https://groups.google.com/d/optout.