PDA

View Full Version : Preventing mouse wheel from changing a field



Dachannien
January 24th, 2007, 08:57
Hi, all,

I know there's a tag "limits" which constrains the mouse wheel to only be able to modify a numbercontrol within a certain range of values. What I'm interested in, however, is a tag which prevents the mouse wheel from changing the value of a numbercontrol at all. Anybody know of one? :)

Thanks!

P.S. "limits" won't work for this. If you set the min/max range of "limits" to zero, then you can change the value of the field to whatever you want with the keyboard, but when you use the mouse wheel on that field, it immediately sets it back to zero.

Cantstanzya
January 24th, 2007, 12:01
Here (https://forums.fantasygrounds.com/forums/showthread.php?t=4351&highlight=scroll) is your answer

Dachannien
January 24th, 2007, 20:26
Thanks. That thread was about scrolling a text control around, but it's probably also true that there's no tag to block the mouse wheel from changing a number control. If there is, though, I'm still interested in knowing what it is ;)

To explain briefly, here's the problem - I was DMing the other day, and I was looking at the character sheet of one of my players who was playing a wizard. I was looking at his spell list and wanted to scroll the whole thing up because it was too big to see the whole thing at once. Unfortunately, I had the cursor directly over the "level" field of one of the spells, so when I moved the wheel, it changed the level of that spell. Of course, FG instantly resorted the list, which moved another spell underneath my cursor, and as I continued moving the wheel, it continued changing the level of one spell after another. I had munged a good dozen entries before I realized what had happened :(

Since the spell level field doesn't change often (practically ever), it's not necessary for it to be modifiable by the wheel, and blocking the wheel's effect would be a better solution for preventing another accident than making the spell list no longer sort by level.

Oberoten
January 24th, 2007, 22:24
<value type="readonly" />
<noreset />
<nodrop />

Should set it so that there is no way to miodify it except by operations.

TarynWinterblade
January 25th, 2007, 19:25
<value type="readonly" />
<noreset />
<nodrop />

Should set it so that there is no way to miodify it except by operations.

That wouldn't work too well for his problem though, as if he puts that on the spell entry, it wouldn't allow players to put in their own spells, since they couldn't change the spell level.

Of course, the other option, since it is a problem with the spell level (something generally bounded between 0 and 9 - and epic), you could make it into a multistate.

Dachannien
January 26th, 2007, 03:43
you could make it into a multistate.

That's a pretty good idea, actually. Thanks :)