dotNet UI

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

REPLY TO THREAD
 
Thread Tools Search this Thread Display Modes
Old 11 November 2013   #211
That's a bummer. I was hoping that would not have to be the route. Does anyone have examples of how to do something like this?
__________________
____________ ___ __ _
John A. Martini
JokerMartini@hotmail.com
www.JokerMartini.com
 
Old 11 November 2013   #212
 
Old 12 December 2013   #213
Hi guys, not posted in a while but the dot net form is going well. Have got the treeview working and everything is going to plan(ish).

Is there a way to traverse up and down a folder directory with maxscript?

Say I have a folder location and want to go up to a parent folder or up to a folder more than one step above. Would like to do it with maxscript not dot net, but can implement dot net way if the former cannot be done (which I am sure it can be)

Will continue to research, its probably going to be quite basic but pointers welcome. And some mild abuse would also be ok.
__________________
Knowledge is power, but imagination is limitless
 
Old 12 December 2013   #214
I could use filterstring of course but that is a ball ache.
__________________
Knowledge is power, but imagination is limitless
 
Old 02 February 2014   #215
changing color

How can i change the color of the actual text in the textbox to be blue and then change to green after it reaches a certain number of characters?


Code:
rollout unnamedRollout "Untitled" width:260 height:184 ( dotNetControl textBox "textbox" pos:[16,112] width:232 height:20 ) createDialog unnamedRollout
__________________
____________ ___ __ _
John A. Martini
JokerMartini@hotmail.com
www.JokerMartini.com
 
Old 02 February 2014   #216
Quote:
Originally Posted by JokerMartini
How can i change the color of the actual text in the textbox to be blue and then change to green after it reaches a certain number of characters?


Code:
rollout unnamedRollout "Untitled" width:260 height:184 ( dotNetControl textBox "textbox" pos:[16,112] width:232 height:20 ) createDialog unnamedRollout

Code:
try(DestroyDialog ::unnamedRollout)catch() rollout unnamedRollout "Untitled" width:260 height:184 ( fn changeTxtColor ctrl splitAfter:10 = ( ctrl.forecolor = if ctrl.TextLength <= splitAfter then ctrl.forecolor.DodgerBlue else ctrl.forecolor.LawnGreen ) dotNetControl textBox "textbox" pos:[16,112] width:232 height:20 on textBox TextChanged arg do changeTxtColor textBox on textBox GotFocus arg do enableAccelerators = false on textBox LostFocus arg do enableAccelerators = true on unnamedRollout open do ( textBox.BackColor = textBox.BackColor.black changeTxtColor textBox ; textBox.focus() ) ) createDialog unnamedRollout
__________________
Looking in the right side. [bgaTools]
 
Old 02 February 2014   #217
Awesome.
Thank you.


Whats this for "enableAccelerators"
__________________
____________ ___ __ _
John A. Martini
JokerMartini@hotmail.com
www.JokerMartini.com
 
Old 02 February 2014   #218
Quote:
Originally Posted by JokerMartini
Awesome.
Thank you.


Whats this for "enableAccelerators"

enableAccelerators allows you to type in the controls.
__________________
Looking in the right side. [bgaTools]
 
Old 04 April 2014   #219
enableAccelerators is not needed if you are using a dotNetControl inside of a rollout like in the example above!

I also believe that if you are using a maxForm you will not need to use enableAccelerators in order to be able to type inside .Net Controls.
__________________
Felipe Nogueira aka: PePeTD
Technical Artist/Character TD
http://felipenogueira3d.com
 
Old 04 April 2014   #220
Quote:
Originally Posted by PePeTD
enableAccelerators is not needed if you are using a dotNetControl inside of a rollout like in the example above!

I also believe that if you are using a maxForm you will not need to use enableAccelerators in order to be able to type inside .Net Controls.


Exactly right. Both MaxForms and Rollouts do not require any methods to call enable/disableAccellerators. Annoyingly MaxForms also catch any keyboard shortcuts you have assigned to catch your tool being closed through a macroscript, which is why I prefer using a windows form and handling it all myself.
 
Old 07 July 2014   #221
mass editor

I was wondering how i can make it so i could select multiple items in this list and right click and edit 'position' for just the selected items in the list. Then maybe select a few other items in the list and adjust the 'wirecolor' for all those objects.

How can i do this?

Code:
try(destroyDialog rlSampler)catch() rollout rlSampler "The Rollout" width:300 ( button btnRefresh "Refresh" dotNetControl lv "system.windows.forms.listView" pos:[10,40] width:480 height:400 on testButton pressed do ( clearListener() --Clear the listener. format "Props\n" --Format a header so we know what we are looking at below. showProperties lv --Show the properties of the listView control. format "\nMethods\n" --Format a header so we know what we are looking at below. showMethods lv --Show the properties of the listView control. format "\nEvents\n" --Format a header so we know what we are looking at below. showEvents lv --Show the properties of the listView control. ) --Innitialize the listview control fn initLv theLv= ( --Setup the forms view theLv.view=(dotNetClass "system.windows.forms.view").details theLv.FullRowSelect=true --Set so full width of listView is selected and not just first column. theLv.GridLines=true --Show lines between the items. theLv.MultiSelect=true --Allow for multiple selections. ) --Add columns. fn addColumns theLv columnsAr= ( w=(theLv.width/columnsAr.count)-1 --Calculate the width of each column. for x in columnsAr do --Loop through all the column names to be added. ( theLv.columns.add x w --Add each new column to the listview control. ) ) --Adds rows of data to the listView fn populateList theLv= ( rows=#() --Empty array to collect rows of data for x in objects do --Loop through all the objects in the scene. ( li=dotNetObject "System.Windows.Forms.ListViewItem" x.name --Create a listViewItem object and name it. li.subitems.add ((superclassOf x) as string) --Add data to the second column. li.subitems.add (((x.wireColor) as point3) as string) --Add data to the third coumn li.subitems.add (((x.Position) as point3) as string) --Add data to the forth coumn append rows li --Added the listViewItem to the rows array ) theLv.items.addRange rows --Add the array of rows to the listView control. ) on lv mouseDown arg do ( clearListener() showProperties arg print "---" hit=(lv.HitTest (dotNetObject "System.Drawing.Point" arg.x arg.y)) showProperties hit showProperties hit.item print hit.item.text showProperties hit.item.subItems print hit.item.subItems.count print hit.item.subItems.item[1].text ) on rlSampler open do ( initLv lv addColumns lv #("Object","Class","Wire Color","Position") populateList lv ) ) --Create a dialog and assign the rollout to it. createDialog rlSampler 500 450
__________________
____________ ___ __ _
John A. Martini
JokerMartini@hotmail.com
www.JokerMartini.com
 
reply share thread



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:03 AM.


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