Expanded Icon Controls (None Specified)
At 12 JAN 1998 08:20:24PM Paul Marfia wrote:
Let's see if all the big bucks for Works is worth it!
I would like to know what it would take to be able to add "intelligent" icons to a Window. Right now, icons are just static bitmaps on the window. I want what would be a pushbutton with an icon face. A classic example would be the Trash can icon.
Seems simple enough, right? But now, I want to *optionally* generate this icon on the window only if the user wants it. I need the icon to be able to be dragged wherever the user wants it on the live window.
For a bonus, I would like to programmatically know if this icon had another icon dragged over the top of it and "dropped".
Any takers?
Paul
At 13 JAN 1998 12:13PM Open Insight wrote:
Paul,
You can use a button to do this. You just need to have a bitmapthat has more than one image. Make a button and then go to the push button bitmap properties and select create an entity and pick "SNDLATER" for example you will see that their are tow images. So you need to set your image count to two. You will then get the push button effect. As far as drag and drop functionality I am not too sure.
DaveRevelation
At 13 JAN 1998 05:22PM Paul Marfia wrote:
Dave,
Thanks. I understand the bitmap button icon thing. I _really_ want to be able to dynamically change the button/bitmap/icon location at the whim of the user. Is this information (window layout) somehow compiled into the window definition - so that it would not be available at runtime?
Paul
P.S. Still can't read the original message (below this response box) from this web page.
At 16 JAN 1998 11:57AM David Sigafoos wrote:
Paul,
Back before 2.0 came out I came up with a routine called 'Window_Bitmaps' and put it out on CIS. THis routine allowed using bitmaps for buttons, radio and checks AND allows resizing the controls from a graphic tablet.
What does this have to do with your question … nothing .. I just wanted to ramble
No .. really .. here is a little scenerio for you.
Create a new window with no table then put a single button on the form
with the following code for the Click Event
Declare Function Get_Property
Declare FUnction Set_Property
$Insert Ctrl_Property_Equates
CurSize=Get_Property(CtrlEntId,Size$)
For Pntr=1 to 500
CurSize=PntrRtn=Set_Property(CtrlEntId,Size$,CurSize)Next Pntr
RETURN 0
The Size property of any control contains the XY coordinates as well as the XY sizing.
=Xcoordinate
=Ycoordiante
=Xsize
=Ysize
This allows you to move/size the controls any way you wish.
So .. you can create a little process which is called if the user wishes to move/size a control. Using Scroll bars you can let the user define the x/y coordinate or size then if you wish you can save the information into a user file based on screen name. Then when the screen creates (create invisible so no redraw is noticed) simply modify all the controls to the users liking and display the window.
This has worked well in the past .. an although it does not give you drag and drop (i am sure some bit-twirler could figure a way) it does solve your answer ..
So what do I win?
dsig
David Tod Sigafoos ~ SigSOlutions
dsig@teleport.com cis: 70302,77 voice: 503-639-8080