Property Grid Issues and questions

Yeah, someone else wanted something like that… where the buttons would be on the left and right… it would be nice to do it with styles (css) only, which im not sure is possible (yet)… It may mean number stepper needs a new layout / design not sure - but ill have a think about it

Cheers,
Ian

There are focus in / out events, but im not sure if they will be dispatched all the way up the tree from property grid… ill check

Sorry to bug you again on this. Found a few more issues with the property grid.

  1. Items get jumbled up together when you open/collapse groups with invisible items.
    image

  2. Disable/Enable doesn’t work properly. I think there is a problem with the setters.
    The second time you use it toggles the option instead of setting it.
    So if I go:

prop.disabled = false;
prop.disabled = true;

on the same block of code the property will keep toggling instead of always being set to disabled.

  1. Mouse wheel event on the NumberStepper is a bad choice for property grid with a scrollbar. I keep doing it by accident while trying to scroll through the property grid.
    Is there a way to disable this behavior?

Hey

  1. yikes
  2. weird
  3. yeah, i keep doing the same… where the scrolling just “stops” because you happen to be over a stepper

Ill check them all out a little later

Cheers,
Ian

1 Like

Ok, i think those issues should be fixed now… the disabled one was especially interesting… this isnt exactly related to the issue you had, but in the process i noticed a MUCH deeper bug, that it looked like i worked around at some point (rather than tracking and fixing) that DID lead to your issue :confused:

Basically, in the behaviour default i was setting disabled to “false”… well, this mean that these defaults get applied at some point, which is fine usually, but disabled in a recursive operation, it goes through and sets all children to disabled, so, you set disabled in, say a button in xml, then the parent container will set its defaults to false which will then set your button back to enabled… as i mentioned, this wasnt actually your issue, but instead of fixing that one correctly, it looks like i hacked some stuff together to make that type of thing work… (rather than just NOT defaulting disabled to force false)… anyway, should be fixed now, lemme know.

As for the steppers, ive gone with what i think is a decent compromise, which is that the wheel only works when you are focused in on the stepper, i think that works nicer. (thoughts?)

Finally, about your focus in / out event… im not sure how that would work, would you want focus events from the progress grid? Also, isnt it “nicer” to have things happen on change? I mean, if i typed in 1000 into a stepper i would want whatever that means to update immediately, not when i move field… maybe thats just me?

Cheers,
Ian

The disable is acting really strange now. I’m not really sure what it’s doing but I still see some of the issues from before and also sometimes it will even let you edit disabled fields.

As for the steppers, ive gone with what i think is a decent compromise, which is that the wheel only works when you are focused in on the stepper, i think that works nicer. (thoughts?)

Good compromise. This is way better. :+1:

Finally, about your focus in / out event… im not sure how that would work, would you want focus events from the progress grid? Also, isnt it “nicer” to have things happen on change? I mean, if i typed in 1000 into a stepper i would want whatever that means to update immediately, not when i move field… maybe thats just me?

Depends on what you’re using it for. On one of my cases I have a rotation field with a 90 degree step, it works great if I use the buttons to step but if the user types in a value it doesn’t update. If I make it update then anytime a user enter 1 digit it would round down to 0.

So there is no good solution here other than allow the user to enter say 78 and I make the object round up to 90 but it still says 78 on the field. :pensive:
The only way I think I could solve this problem is if I round to nearest step when the field loses focus.

Thanks,
John

Hmmm, do you have some example of the disabled acting up?

Cheers,
Ian

Can’t quite figure it out and would be hard to explain. I can get around the issue by never setting the disable to the same value.

The editing issue should be easy to reproduce on your end, just disable something and type the values on the stepper or string, doesn’t happen to list or boolean types.

-John

Ok, ill have a mess around a little later… i tested it (manually) pretty thoroughly (or so i thought)… but i must have missed something, or something in the way we are constructing things (which defo shouldnt happen)

Cheers,
Ian

The first issue might just be something on my end.
The editing issue only happens with keyboard input.

Yeah, maybe… ill still check it out… i mean, if you are using things reasonably (which it sounds like you are) then its reasonable to expect reasonable results :smiley:

totally forgot to add: thanks for the patronage :slight_smile:

(still havent looked at that disabled issue yet, probably later today)

Cheers,
Ian

1 Like