Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drag an ABACUS bead(s) Up/Down a line.

Status
Not open for further replies.

NotSoVisual

Technical User
Aug 29, 2003
203
MX
I want to make an virtual but haven't a clue! The bead(s) will be pushed/dragged by user via cursor up and dowm a vertical line. Assume 9 beads (numbered 9 to 1 rom right to left) all placed on the left side of a horizontal line. How to drag/move bead 1 or (2&1)to the extreme right and show some intermediate stages? I have no idea other than to make MANY snap shots of the various stages and play them in a picture box. Is here a better way? (I hope)


 
Perhaps a SINGLE "Bead" as a whatever graphic you choose and just place it / them acording to the motion action, which would presumanbly be derived from mouse Down/Up/Move events. With mouse Down event, check if there is currently an "image" in the zone/area. If so, is it a "legal" one to move. If it is (there and) legal, change the image(s) in some way to indicate the selection. Then, follow the mouse move event to track the next/new position(s). As long as it/they are legal, move the 'selected' images. When the move gets to an illegal situation, stop moving and provide some feedback to the user (Bell?) on mouseup, drop the selected image(s) at the last legal position.


Just a thought?



MichaelRed


 
Perhaps I'd better make my request more clear
I want to start with several (in my example below 3)horizontal graphics in picture boxes (I think). The lines will represents
the decimal positions, ie. 1's, 10's and 100's. The line below represents the ones column. The 4 beads to the left have a value of 1 each. and the bead on the right equals 5.

0 #'s 4321 5 various beads ie b(4),b(3)etc
This 0000--------|-----0 represents 0
This 000--------0|-----0 represents 1
This 00--------00|-----0 represents 2
This 0--------000|-----0 represents 3
This --------0000|-----0 represents 4
This 0000--------|0----- represents 5
This 000--------0|0----- represents 6
This 00--------00|0----- represents 7
This 0--------000|0----- represents 8
This --------0000|0----- represents 9


Thsee 0000--------|-----0
2 lines 0000--------|-----0 represents 10

Note.I use this example using horizontal lines because the final abacus will be a Maya one and they wrote their numbers in a vertal format most of the time. With the 1's place at the bottom.

If user starts in the 0 position and want to represent a "7" User will need to drag the five bead towards the left and 2 of the beads towards the right (to the counting bar, the bar of heaven.) I'd want to show two beads on the left (B4 & B3 static and drag the other two B@ & B1 to the right. I gues i can compare the move poz of the bead with the the horizontal coord of LineH within a range I will move the bead.

I hope I made myself clear.







 
Pardon.. in above post
This
Thsee 0000--------|-----0
2 lines 0000--------|-----0 represents 10

SHOULD BE
Thsee 000--------0|-----0 Tens place
2 lines 0000--------|-----0 units place
represent 10

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top