2 entries in a single line in listview!
how do you think, is it possible to insert in listview inside a single line 2 entries like here? http://www.scriptspot.com/files/script_0.jpg
so that I could show text like in attached picture:
I didn't find any info about this here
http://docs.autodesk.com/3DSMAX/15/ENU/MAXScript-Help/index.html?url=fil...
Attachment | Size |
---|---|
listview.jpg | 59.67 KB |
Comments
Thanks, Swordslayer, Now it's working even faster!
No need to make it faster!
I want to change point 3 - make the last row wider like in the picture bellow, and I would like aslo to make my datagrid window rescalebale like in ZOA_PATH_editor.(My script window is allready resizing at it remebers the last changes)
It has a function for listview like that:
in my script I have smth like that
Also, how can I detect texture status like in asset tracking?
To make the automatic size
To make the automatic size adjustments work, I'd add
table.AutoSizeColumnsMode = table.AutoSizeColumnsMode.Fill
and also to make the first column autosize
column1.AutoSizeMode = column1.AutoSizeMode.DisplayedCells
As for the last line, you'd need a function called on control resize, something like
Minus some margins I guess, but I'm sure you will make it work.
Setting the right datagridview control size on dialog resize is pretty straightforward as you only have to care about its width and height. Resizing dialogs like this can become quite tiresome, though, if you want to resize more than just a few controls, save yourself some pain and use maxforms instead, things like anchors will certainly make you a happier person ;)
Some of my scripts and MCGs :: 3ds Max SDK Intro for Scripters
THANKS Swordslayer! You're idea is great!!!!
I've tried to put datagrid instead and it works!
But I want to change it a little:
1. remove left header like in the image bellow
2 select whole row (but to be able to select more then one row and to find out the selection, so that I could operate with it)
http://stackoverflow.com/questions/285829/datagridview-how-to-focus-the-...
and
give errors
3. make empty row till the end
4. make it faster if possible http://social.msdn.microsoft.com/Forums/en/csharpgeneral/thread/14407d45... using VirtualMode
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridvie...
The first two are simple: =
The first two are simple:
table.SelectionMode = table.SelectionMode.FullRowSelect
which is sort of a shorthand for
table.SelectionMode = (dotNetClass "System.Windows.Forms.DataGridViewSelectionMode").FullRowSelect
and
table.RowHeadersVisible = false
The rest.. I will look into it later when I have more than few minutes to spare, however VirtualMode should not really be needed, unless you do some pretty serious stuff.
Some of my scripts and MCGs :: 3ds Max SDK Intro for Scripters
Using datagridview might be
Using datagridview might be even simpler:
Some of my scripts and MCGs :: 3ds Max SDK Intro for Scripters
Or you can turn grid off and
Or you can turn grid off and select two lines at a time. For example, in the sample barigazy provided, you could add an event handler and a variable to achieve that:
Some of my scripts and MCGs :: 3ds Max SDK Intro for Scripters
...
2 entries in a single line in listview mean something like Entry1 Delimiter Entry2, but you expect multiline entries :) nm, to save width space you can populate ListView with 1st entry (Texture) and when item is selected to display corresponding (by index) value (Map Tree) into EditText ui control.
my recent MAXScripts RSS (archive here)
may be another idea
I see that in order to simplify the work with textures, there is a lot of time to waste for coding!
Interesting, how to display now path and map tree to be easy for reading and not to take all the monitor! I wanted this way to have a smaller window :(
can you image this info on a single line
Texture: \\S003\work_s003\lib\soft\3DSMAX_2012_setup\x\Textures\textures\3_2_11_d.jpg MAP TREE: Compositematerial\VRayMtl\Diffuse\
I guess Better ListView is the only solution!
But prices scared me :) (if I make this script for other people too:)
http://www.componentowl.com/pricing-licensing/better-listview
Thx BOTH
Yes,
TextA\nTextB
of course doesn't help unfortunately!Unless you are on max 8 or
Unless you are on max 8 or lower, don't use ActiveX controls. To have multiline items like this in a standard .NET listview you would most probably have to write your own control using extended listviewitems - or use some 3rd party one like Better ListView. For a basic listview usage look for example at Scriptspot :: Working Checklist. Good luck.
Some of my scripts and MCGs :: 3ds Max SDK Intro for Scripters