CGTalk > Software Specific Forums > 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-29-2013, 06:12 PM   #1
lo
the frequentest!
portfolio
Rotem Shiffman
Tel Aviv, Israel
 
Join Date: Jul 2005
Posts: 2,826
mmMaxControls : 3dsmax style .NET controls

Lately there were a few posts here about how to achieve a native 3dsmax look for .NET controls.

.NET controls offer much more flexibility than the native MAXScript UI elements, but they often look like strangers in 3dsmax, and don't always work as expected.



I've compiled a library of some common controls that should help bridge that gap. They automatically update according to the 3dsmax UI colors, and self-manage EnableAccelerators.
Also, included are FlyoutButton and FlyoutCheckbutton, for which there is no MAXScript alternative, but are part of the 3dsmax UI.

Check it out here
 
Old 05-29-2013, 08:54 PM   #2
fajar
Frequenter
portfolio
fajar
Airdrie, Canada
 
Join Date: May 2009
Posts: 131
Thumbs up



weird flyout button appear....below attachment of icon i m using, using your code.
Attached Files
File Type: zip PFPanHandCursor.zip (399 Bytes, 7 views)
 
Old 05-29-2013, 09:47 PM   #3
feranti
Frequenter
Antoine Ferrieux
Paris, France
 
Join Date: Apr 2008
Posts: 208
Many thanks to you for sharing that, lo!
So far, I only made the simple button. Nice work!

PS: Actually, copy-pasting your sample code result in errors because of the lack of the pictures. Is it possible that you join a fully working test sample (the one in your post is perfect) with all the pictures used in it? Moreover, it will show an example of the kind of pictures to be put in the controls. Great job again!

Last edited by feranti : 05-29-2013 at 09:59 PM.
 
Old 05-29-2013, 10:23 PM   #4
denisT
MAX Doctor
 
denisT's Avatar
portfolio
Denis Trofimov
CA, USA
 
Join Date: Jul 2009
Posts: 9,189
Send a message via ICQ to denisT
Quote:
Originally Posted by lo
Lately there were a few posts here about how to achieve a native 3dsmax look for .NET controls.

.NET controls offer much more flexibility than the native MAXScript UI elements, but they often look like strangers in 3dsmax, and don't always work as expected.

good job! but there some controls that works not exactly as native max controls.
for example:
# spinner doesn't reset value after pressing Right Button during dragging
# spinner's value should go faster with Control pressed and slower with Alt pressed
# when you press on any spinner arrow and not release the value has to continuously increment/decrement
# edittext control in max in not using WordWrap mode.
# dropdown button should not cause the dialog flickering (dialog loses focus)...

also radiobuttons and checkdoxes are not supported...

still a lot of work ahead...
 
Old 05-29-2013, 10:25 PM   #5
denisT
MAX Doctor
 
denisT's Avatar
portfolio
Denis Trofimov
CA, USA
 
Join Date: Jul 2009
Posts: 9,189
Send a message via ICQ to denisT
... i'm just kidding. honestly i don't see any reason to make .net controls look like native max controls.
 
Old 05-29-2013, 10:32 PM   #6
lo
the frequentest!
portfolio
Rotem Shiffman
Tel Aviv, Israel
 
Join Date: Jul 2005
Posts: 2,826
Quote:
Originally Posted by fajar


weird flyout button appear....below attachment of icon i m using, using your code.


In my code, I am using the setImageStrip method, which takes a row of icons, and parses them as flyout options.
Below is the image I used:


In your case, it is splitting your square bitmap into 4 vertical stripes, which explains that result.

alternatively, you can just set an array of bitmaps into the .images property of the control.

Last edited by lo : 05-29-2013 at 10:36 PM.
 
Old 05-29-2013, 10:35 PM   #7
lo
the frequentest!
portfolio
Rotem Shiffman
Tel Aviv, Israel
 
Join Date: Jul 2005
Posts: 2,826
Quote:
Originally Posted by feranti
PS: Actually, copy-pasting your sample code result in errors because of the lack of the pictures. Is it possible that you join a fully working test sample (the one in your post is perfect) with all the pictures used in it? Moreover, it will show an example of the kind of pictures to be put in the controls. Great job again!


Good point, I've added the images to the post.
 
Old 05-29-2013, 10:41 PM   #8
lo
the frequentest!
portfolio
Rotem Shiffman
Tel Aviv, Israel
 
Join Date: Jul 2005
Posts: 2,826
Quote:
Originally Posted by denisT
# spinner doesn't reset value after pressing Right Button during dragging
Will look into it.
Quote:
Originally Posted by denisT
# spinner's value should go faster with Control pressed and slower with Alt pressed
Will look into it.
Quote:
Originally Posted by denisT
# when you press on any spinner arrow and not release the value has to continuously increment/decrement
This already happens.
Quote:
Originally Posted by denisT
# edittext control in max in not using WordWrap mode.
But wouldn't you prefer it to?
Quote:
Originally Posted by denisT
# dropdown button should not cause the dialog flickering (dialog loses focus)...
Will look into it.
Quote:
Originally Posted by denisT
also radiobuttons and checkdoxes are not supported...
They're already very similar to the 3dsmax native controls and the colors easily customizable, I didn't see a need. If there's any demand I can add it.

Thanks for the feedback.
 
Old 05-29-2013, 10:50 PM   #9
denisT
MAX Doctor
 
denisT's Avatar
portfolio
Denis Trofimov
CA, USA
 
Join Date: Jul 2009
Posts: 9,189
Send a message via ICQ to denisT
Quote:
Originally Posted by lo
This already happens.

hmm... it doesn't work for me
Quote:
But wouldn't you prefer it to?

it's easy to set it up as you want... maybe the default setting for WordWrap has to be OFF.
 
Old 05-30-2013, 01:50 AM   #10
fajar
Frequenter
portfolio
fajar
Airdrie, Canada
 
Join Date: May 2009
Posts: 131
@denisT : Btw how to build flyout button like in that Mr.lo Posted using native maxscript and pure dotnet ? which dotnet i should use ? could you gime little example ?

Thanks many ways
 
Old 05-30-2013, 03:37 AM   #11
denisT
MAX Doctor
 
denisT's Avatar
portfolio
Denis Trofimov
CA, USA
 
Join Date: Jul 2009
Posts: 9,189
Send a message via ICQ to denisT
Quote:
Originally Posted by fajar
@denisT : Btw how to build flyout button like in that Mr.lo Posted using native maxscript and pure dotnet ? which dotnet i should use ? could you gime little example ?

no! Mr.Lo will give you all right.
 
Old 05-30-2013, 07:09 AM   #12
lo
the frequentest!
portfolio
Rotem Shiffman
Tel Aviv, Israel
 
Join Date: Jul 2005
Posts: 2,826
Quote:
Originally Posted by fajar
@denisT : Btw how to build flyout button like in that Mr.lo Posted using native maxscript and pure dotnet ? which dotnet i should use ? could you gime little example ?

Thanks many ways


The button is a UserControl, the flyout part is a Form. They're both fully owner drawn.
 
Old 05-30-2013, 09:05 AM   #13
fajar
Frequenter
portfolio
fajar
Airdrie, Canada
 
Join Date: May 2009
Posts: 131
ahhhh.... too much input...i think my head will blown in second. , im still in the procces of learning dotNet. but will continue again tommorow.
 
Old 05-30-2013, 01:52 PM   #14
lo
the frequentest!
portfolio
Rotem Shiffman
Tel Aviv, Israel
 
Join Date: Jul 2005
Posts: 2,826
Quote:
Originally Posted by denisT
hmm... it doesn't work for me


Which 3dsmax version? Also, as dotNetControl or dotNetObject?
 
Old 05-30-2013, 02:35 PM   #15
denisT
MAX Doctor
 
denisT's Avatar
portfolio
Denis Trofimov
CA, USA
 
Join Date: Jul 2009
Posts: 9,189
Send a message via ICQ to denisT
Quote:
Originally Posted by lo
Which 3dsmax version? Also, as dotNetControl or dotNetObject?

it's max 2012/64. i'm using your sample. it happens probably because you show new form and parent form loses focus. try to show the popup form with the SWP_NOACTIVATE flag
 
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 05:05 PM.


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