Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / MaxScript / Problem with listbox.readOnly
  RSS 2.0 ATOM  

Problem with listbox.readOnly
Rate this thread
 
37386
 
Permlink of this thread  
avatar
  • Ebee
  • Posted: 02 December 2009 08:24 PM
  • Total Posts: 10
  • Joined: 09 May 2008 10:29 AM

Hello everyone.

MaxScript Reference reveals the readOnly -feature of a listbox:

[listbox].readOnly
When set to true, the user cannot pick items from the list. When false, the user can pick items from the list.

Yet it seems I can’t toggle that parameter. I used this script to test it out:

try(destroyDialog listboxtest)catch()

rollout listboxtest 
"listbox.readonly test"
(
 listbox testlist 
"Listbox" readOnly:false items:#("1","2","3")
 
checkbox readOnlyToggle "Listbox.readOnly toggle" checked:false
 
 on readOnlyToggle changed value 
do
 
(
 testlist
.readOnly value
 )
)

createDialog listboxtest

The rollout pops up, but when I try to toggle I get this:

-- Unknown property: “readOnly” in ListBoxControl:testlist

Anyone see a typo in my script? Or is this a bug?



Replies: 0
avatar
  • Location: West Midlands, England, UK
  • Total Posts: 14445
  • Joined: 06 August 2007 11:06 PM
  • Permlink of this post

Moved to the Maxscript forum (from Max 2010). You will get better responses by posting in the correct forum.



Max 4.2 through 2013.
XP-64 (SP2)
NVidia 9800GTX-512 (Driver 266.58).
Core 2 Quad Q6600 2.4GHz, 8Gb Ram, DX9.0c.

Replies: 0
avatar
  • Location: West Midlands, England, UK
  • Total Posts: 14445
  • Joined: 06 August 2007 11:06 PM
  • Permlink of this post

Looks like a bug, but whether it’s a bug in Max or an error in the Maxscript Help I don’t know. Using readOnly:True or readOnly:False in the constructor does work, but the property doesn’t seem to exist afterwards.

Either way, it’s been there a long time - fails identically in all recent releases (back to Max 7).



Max 4.2 through 2013.
XP-64 (SP2)
NVidia 9800GTX-512 (Driver 266.58).
Core 2 Quad Q6600 2.4GHz, 8Gb Ram, DX9.0c.

Replies: 0