How to get sticky lines like in Relationship View?

MsAccessNL

Member
Local time
Today, 06:53
Joined
Aug 27, 2022
Messages
204
Is it possible to get sticky lines as show in the table relationship overview? I want to make a workflow interface where the different stations (=Subformcontrols) are draggable (this part is already working). It would be nice if the connection lines between the stations would also move along, just like the in the tools/relationship overview. The movement calculations are getting quickly pretty complicated. May be there is some working code or a windows api?
 
it just involves a lot of work, so far as I am aware there are no API's that can do this for you.

I would look at creating a class module to handle lines, a new class invoked for each line. Inputs would be the objects at each end. You will probably need some rules regarding where on each object the line is anchored depending on their relative positions
 
I imagine the relationship view redraws the lines to match the tables and fields in the relationship, using some internal logic for the lines. Some are underneath other entities, some go around, and so on.

In your case, you would probably have to drop the current stationA- stationB line and redraw it based on the new locations.
 
The movement calculations are getting quickly pretty complicated.
Maybe show how you are doing this. People might have observations about how to make this easier.
 
i already put this in Sample Database forum.
here for you to use.
 

Attachments

Very nice Arnel. (y)

Why is it that I can open some of your DBs, and not others? :(
 
Why is it that I can open some of your DBs, and not others?
that, i don't know.
my guess is that maybe i have created/edited on other versions and bitness.
 
i already put this in Sample Database forum.
here for you to use.
Thanx Arnlgp, exactly what i am looking for! The next step is to save the changed positions, so when you reopen the form you get the last created layout. I think a table with top left positions of the controls. A new idea is always more work then you intentially expected. Thanx for helping me with the first steps.
 
Take a look here. Does the saving and reloading of positions.

 
also this one will save the "last positions" of the label when you close the form.
 

Attachments

Users who are viewing this thread

Back
Top Bottom