CGTalk > Software > Autodesk 3ds max > 3dsMax SDK and MaxScript
Login register
Thread Closed share thread « Previous Thread | Next Thread »
 
Thread Tools Search this Thread Display Modes
Old 05-30-2013, 03:21 PM   #31
denisT
MAX Doctor
 
denisT's Avatar
portfolio
Denis Trofimov
CA, USA
 
Join Date: Jul 2009
Posts: 9,338
Send a message via ICQ to denisT
Quote:
Originally Posted by lo
Code:
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
 
Old 05-30-2013, 03:24 PM   #32
denisT
MAX Doctor
 
denisT's Avatar
portfolio
Denis Trofimov
CA, USA
 
Join Date: Jul 2009
Posts: 9,338
Send a message via ICQ to denisT
# 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?

Last edited by denisT : 05-30-2013 at 03:32 PM.
 
Old 05-30-2013, 03:26 PM   #33
lo
the frequentest!
portfolio
Rotem Shiffman
Tel Aviv, Israel
 
Join Date: Jul 2005
Posts: 2,827
Quote:
Originally Posted by denisT
# a check button has to keep border in the checked state


right, will fix.

Quote:
Originally Posted by denisT
# max spinner has two extra settings: Use Snap and Wrap Cursor Near Spinner.Do you want to support them as well?

I've never used them, so I guess not

Last edited by lo : 05-30-2013 at 03:38 PM.
 
Old 05-30-2013, 03:37 PM   #34
denisT
MAX Doctor
 
denisT's Avatar
portfolio
Denis Trofimov
CA, USA
 
Join Date: Jul 2009
Posts: 9,338
Send a message via ICQ to denisT
most difficult part of .net spinner 'work like max' implementation is to support the same undo/redo logic which is not trivial.
 
Old 05-30-2013, 03:39 PM   #35
lo
the frequentest!
portfolio
Rotem Shiffman
Tel Aviv, Israel
 
Join Date: Jul 2005
Posts: 2,827
Quote:
Originally Posted by denisT
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.
 
Old 05-30-2013, 03:43 PM   #36
denisT
MAX Doctor
 
denisT's Avatar
portfolio
Denis Trofimov
CA, USA
 
Join Date: Jul 2009
Posts: 9,338
Send a message via ICQ to denisT
Quote:
Originally Posted by lo
Obviously it's not something that can be done without a reference to the 3dsmax hold system.

true... but the control has to return flags like dragging started and canceled...
 
Old 05-30-2013, 03:50 PM   #37
lo
the frequentest!
portfolio
Rotem Shiffman
Tel Aviv, Israel
 
Join Date: Jul 2005
Posts: 2,827
Quote:
Originally Posted by denisT
true... but the control has to return flags like dragging started and canceled...

Right, I can add those events.
 
Old 05-30-2013, 04:36 PM   #38
denisT
MAX Doctor
 
denisT's Avatar
portfolio
Denis Trofimov
CA, USA
 
Join Date: Jul 2009
Posts: 9,338
Send a message via ICQ to denisT
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.
 
Old 05-30-2013, 04:53 PM   #39
lo
the frequentest!
portfolio
Rotem Shiffman
Tel Aviv, Israel
 
Join Date: Jul 2005
Posts: 2,827
Quote:
Originally Posted by denisT
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.


This is implemented in my control. It does not inherit from NumericUpDown btw.
 
Old 05-30-2013, 05:02 PM   #40
denisT
MAX Doctor
 
denisT's Avatar
portfolio
Denis Trofimov
CA, USA
 
Join Date: Jul 2009
Posts: 9,338
Send a message via ICQ to denisT
# backspace is not working in your spinner
 
Old 05-31-2013, 03:08 PM   #41
lo
the frequentest!
portfolio
Rotem Shiffman
Tel Aviv, Israel
 
Join Date: Jul 2005
Posts: 2,827
I've posted an update with all these fixes.
Changes:
  • Spinner: Backspace key was not working.
  • Spinner: now behaves correctly for resetting and cancelling a spin operation.
  • Spinner: now goes faster/slower with control/alt buttons pressed, as native 3dsmax spinner.
  • Spinner: text area would not accept the enter key when used as a DotNetControl.
  • Spinner: now shows the correct mouse cursor when dragging.
  • Spinner: ‘dragging’ behavior now only begins when the mouse has left the control area.
  • Spinner: Added .Clear() method for setting the control in an indeterminate state.
  • Spinner: Added events for ButtonDown and ButtonUp, similar to the native 3dsmax events.
  • Button: Contents are now corrently moved 1 pixel to the right and down when pressed.
  • CheckButtons: Frame is now always shown when button is checked, even if FrameOnMouseOverOnly is on.
  • Flyout controls: Opening the flyout no longer steals focus from the host dialog.
  • Flyout controls: Added .ShowFlyout() method for programmatically opening the flyout, e.g. – when you want another button to open the flyout.

Thanks to Denis for catching most of them.

http://www.monotoneminimal.com/archives/610
 
Old 05-31-2013, 04:29 PM   #42
denisT
MAX Doctor
 
denisT's Avatar
portfolio
Denis Trofimov
CA, USA
 
Join Date: Jul 2009
Posts: 9,338
Send a message via ICQ to denisT
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

Last edited by denisT : 05-31-2013 at 04:35 PM.
 
Old 05-31-2013, 04:41 PM   #43
denisT
MAX Doctor
 
denisT's Avatar
portfolio
Denis Trofimov
CA, USA
 
Join Date: Jul 2009
Posts: 9,338
Send a message via ICQ to denisT
# one known problem of .net NumericUpDown control could be fixed. in max when you simply get spinners float value the control returns always integer.
 
Old 05-31-2013, 05:11 PM   #44
lo
the frequentest!
portfolio
Rotem Shiffman
Tel Aviv, Israel
 
Join Date: Jul 2005
Posts: 2,827
Quote:
Originally Posted by denisT
# 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/mmMa...54af2759740766f

You can set it to SelectionMode.ResetAfterSelection to get the behavior you described. Both types of behaviors exist in 3dsmax.

Last edited by lo : 05-31-2013 at 05:22 PM.
 
Old 05-31-2013, 05:12 PM   #45
lo
the frequentest!
portfolio
Rotem Shiffman
Tel Aviv, Israel
 
Join Date: Jul 2005
Posts: 2,827
Quote:
Originally Posted by denisT
# one known problem of .net NumericUpDown control could be fixed. in max when you simply get spinners float value the control returns always integer.


See the FloatValue property of the spinner.
http://www.monotoneminimal.com/mmMa...3b08afdda013d67
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 11:13 AM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.