also:
all pressed button labels have to go 1 pixel right and down (the same way as checkbuttons)
Could this not be implemented just by adding an arrow button next to a flyout button?
why does combobox need custom version? .net one can look exactly the same with DropDownStyle.DropDownList style
.net TextBox might be setup to look exactly as EditText… EnableAccelerators… well. but it works correct for dotnetcontrols and for dotnetobjects placed into MaxForm
Only because the colors are different than the max colors, otherwise it is identical.
it sounds like unnecessary service… it’s cool, but a developer can handle color change events himself.
The main issue I have with that setup is the problem catching enter with multiline textboxes, which my controls fixes.
Also, how do you add a dotnetcontrol do a maxForm?
i don’t have a problem with it if both AcceptsReturn and AcceptsTab set to TRUE
Also, how do you add a dotnetcontrol do a maxForm?
i don’t add dotnetcontrols to a MaxForm. i add dotnetobjects
rollout r "r"
(
dotnetcontrol tb "TextBox" width:100 height:60
on r open do
(
tb.multiline = on
tb.acceptsreturn = on
tb.acceptstab = on
)
)
createDialog r
This does not work for me, does it work for you?
no. just simple like that it doesn’t work for me either. probably i do the same as you by handling KeyDown event
The point is to free the developer from having to register to max CUI events and to minimize the tedium of setting up dotnet controls in maxscript.
Granted, the textbox and dropdownlist are not the most dramatic or hard to set up manually, but if you’re already referencing an assembly, why not make it more complete?
my logic is simple… the idea to replicate max controls has to be flexible enough to keep an advantage of using .net controls. i think that manageable backcolor is a good feature for example for checkbuttons.
a check button has to keep border in the checked state
max spinner has two extra settings: Use Snap and Wrap Cursor Near Spinner.Do you want to support them as well?
most difficult part of .net spinner ‘work like max’ implementation is to support the same undo/redo logic which is not trivial.
Obviously it’s not something that can be done without a reference to the 3dsmax hold system.
there is another very important difference in max spinner and numericDropDown control behavior. when max spinner loses focus it sets the value from edit text field instead of .net control.
I’ve posted an update with all these fixes.
Changes:
[ul]
[li]Spinner: Backspace key was not working.
[/li][li]Spinner: now behaves correctly for resetting and cancelling a spin operation.
[/li][li]Spinner: now goes faster/slower with control/alt buttons pressed, as native 3dsmax spinner.
[/li][li]Spinner: text area would not accept the enter key when used as a DotNetControl.
[/li][li]Spinner: now shows the correct mouse cursor when dragging.
[/li][li]Spinner: dragging behavior now only begins when the mouse has left the control area.
[/li][li]Spinner: Added .Clear() method for setting the control in an indeterminate state.
[/li][li]Spinner: Added events for ButtonDown and ButtonUp, similar to the native 3dsmax events.
[/li][li]Button: Contents are now corrently moved 1 pixel to the right and down when pressed.
[/li][li]CheckButtons: Frame is now always shown when button is checked, even if FrameOnMouseOverOnly is on.
[/li][li]Flyout controls: Opening the flyout no longer steals focus from the host dialog.
[/li][li]Flyout controls: Added .ShowFlyout() method for programmatically opening the flyout, e.g. when you want another button to open the flyout.
[/li][/ul]
Thanks to Denis for catching most of them.
spinners work correct at first glance…
checkbutton in max checks on mouse down and un-checks on mouse up. yours works different when it checks
flyout checkbutton works strange for me… i expect this kind of behavior:
… simple press changes state (on/off)
… press and hold pops up flyout buttons, where you can pick one without changing a state
This already exists, I just forgot to include it in the documentation. See the SelectionMode property:
http://www.monotoneminimal.com/mmMaxControls/Docs/classmm_max_controls_1_1_flyout_button.html#a5c0c406fba2460a0d54af2759740766f
You can set it to SelectionMode.ResetAfterSelection to get the behavior you described. Both types of behaviors exist in 3dsmax.