ECToo / pymel

Automatically exported from code.google.com/p/pymel
0 stars 0 forks source link

The function TextScrollList.selectAll() doesn't work. No function TextScrollList.selectIndexedItem() #265

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Describe the problem.

---
The funcion selectAll() of class TextScrollList (from uitypes) doesn't work. 
That function use selectIndexedItems() function to select all items on the 
list, and the problem mainly appear in this function because it use 
selectIndexedItem(), which basically doesn't exists in the class TextScrollList.

What Version of Maya are you using?

---
maya2011-x64

On what operating system? (be as specific as possible and include service
packs, 64bit vs 32bit, etc)

---
Ubuntu 10.04 x64

What Version of PyMEL are you using?

---
1.0.4

What is the expected output? What do you see instead?

---
The expected output is to see selected all items in textScrollList.

If possible, provide a few lines of code to reproduce the problem. It helps
us if your code will reproduce the problem from a new scene.

---

import pymel.core as pm
pm.window()
pm.paneLayout()

ts = pm.textScrollList( numberOfRows=8, allowMultiSelection=True,
                    append=['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten',
                                    'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen'],
                    selectItem='six', showIndexedItem=4 )
pm.showWindow()
ts.selectAll()

Does maya.cmds exhibit the same problem?

---
No

Please provide any additional information below.

Original issue reported on code.google.com by hektor1...@gmail.com on 7 Dec 2011 at 11:01

GoogleCodeExporter commented 9 years ago
a work-around:

for i in range(1,TextScrollList_Object.getNumberOfItems()+1):
    TextScrollList_Object.setSelectIndexedItem(i)

The problem is probably a typo where self.selectIndexedItem(x) is supposed to 
be self.setSelectIndexedItem(x)

Original comment by ChrisHec...@gmail.com on 31 May 2014 at 12:36