Okay. In that case, spring detents should be fine.
What will you be doing with this? There's a probability that what you're looking for is already a thing.
Actually, now that I think about it, do you really need the H-track? If all you want is a small platform (say 5" square) that you want to raise and lower, you could just use parts from an old drill press. It has a little table that goes up and down and locks in place with a screw.
PVC Pipe Sch40 1 Inch (1.0) White Custom Length - 3FT https://www.amazon.com/dp/B086VRL29T/ref=cm_sw_r_apan_i_Y16QTTHK1F7022ZWM05Z
C429-010 1 COUPLING https://www.amazon.com/dp/B007Q2GY50/ref=cm_sw_r_apan_i_EFVY8GYBX1Q3PVMWR9EG
Put this on a 1" PVC vertical pipe. Then put a set screw in it. Attach a horizontal pipe to it, and then put your table on the horizontal pipe.