The_Doc_Man
11-06-2001, 12:50 PM
This one is strange. It happens on an Access 97 database.
I have a form with a few sliders on it and a couple of action buttons. The idea is that the users select from a limited range of values with the sliders and then presses an action button to build something (an encoded key string) that depends on the various slider values.
I have a mode button that allows users to include a certain randomness of size into the factors. In "fixed" mode, I only need two parameters, total size and a subset selector. In "random" mode the total size becomes the minimum size and the maximum size slider becomes enabled. The generated key is between the minimum and maximum size and the subset size is constrained according to our business rules.
So, as you might guess, I enable and disable the extra slider and make it visible or invisible based on the current setting of the mode button. No biggie, right? Wrong!
When I first open the form in random mode, the three sliders look ok. But if I change to fixed mode (so the extra slider disappears), do something in fixed mode, and change back to random mode, the maximum_length slider control appears but it has SHRUNK. It is suddenly 15 twips smaller (both height and width) than it had been previously. If I swap modes to fixed and back to random without closing the form, it shrinks ANOTHER 15 twips. If I check the properties of the hidden control when in fixed mode, it has not changed. I.e. the size change only occurs in the transition from invisible/disabled to visible/enabled. It will continue to shrink like this until the slider gets to about the thickness of a two-point or three-point line.
Has anyone run into anything like this before? And does anyone have ANY clue as to what is going on here?
I assure you, I am NOT touching the .Height and .Width properties. I am, however, adjusting the minimum_size slider .Min and .Max properties on both transitions. In the random-to-fixed transition, the .Max of the maximum-length slider becomes the .Max of the (only) length slider. In the fixed-to-random transition, the .Max of the minimum length slider and the .Min of the maximum length slider become half the difference between the .Max and .Min of the fixed-length slider. (I know that sounds complex, but it makes sense in the context in which I use it.)
No, the amount of the .Min/.Max change isn't 15 twips. It is closer to 6 units.
Follow-up: As a workaround, I have another slider that is the same size. So every time I activate the incredible shrinking slider, I copy its .Width and .Height from the other slider. At least it doesn't shrink now. But this is still rather perplexing.
[This message has been edited by The_Doc_Man (edited 11-09-2001).]
I have a form with a few sliders on it and a couple of action buttons. The idea is that the users select from a limited range of values with the sliders and then presses an action button to build something (an encoded key string) that depends on the various slider values.
I have a mode button that allows users to include a certain randomness of size into the factors. In "fixed" mode, I only need two parameters, total size and a subset selector. In "random" mode the total size becomes the minimum size and the maximum size slider becomes enabled. The generated key is between the minimum and maximum size and the subset size is constrained according to our business rules.
So, as you might guess, I enable and disable the extra slider and make it visible or invisible based on the current setting of the mode button. No biggie, right? Wrong!
When I first open the form in random mode, the three sliders look ok. But if I change to fixed mode (so the extra slider disappears), do something in fixed mode, and change back to random mode, the maximum_length slider control appears but it has SHRUNK. It is suddenly 15 twips smaller (both height and width) than it had been previously. If I swap modes to fixed and back to random without closing the form, it shrinks ANOTHER 15 twips. If I check the properties of the hidden control when in fixed mode, it has not changed. I.e. the size change only occurs in the transition from invisible/disabled to visible/enabled. It will continue to shrink like this until the slider gets to about the thickness of a two-point or three-point line.
Has anyone run into anything like this before? And does anyone have ANY clue as to what is going on here?
I assure you, I am NOT touching the .Height and .Width properties. I am, however, adjusting the minimum_size slider .Min and .Max properties on both transitions. In the random-to-fixed transition, the .Max of the maximum-length slider becomes the .Max of the (only) length slider. In the fixed-to-random transition, the .Max of the minimum length slider and the .Min of the maximum length slider become half the difference between the .Max and .Min of the fixed-length slider. (I know that sounds complex, but it makes sense in the context in which I use it.)
No, the amount of the .Min/.Max change isn't 15 twips. It is closer to 6 units.
Follow-up: As a workaround, I have another slider that is the same size. So every time I activate the incredible shrinking slider, I copy its .Width and .Height from the other slider. At least it doesn't shrink now. But this is still rather perplexing.
[This message has been edited by The_Doc_Man (edited 11-09-2001).]