0

pygame の pgu gui のリストに関するヘルプを探しています。プログラムに含めることができるように、それらが持つメソッドとプロパティを知る必要があります。

4

1 に答える 1

0

私の最初の提案

Python のビルトインを使用してイントロスペクトする

import pgu.gui.List
import inspect
help(pgu.gui.List) # to read out the doc strings
print dir(pgu.gui.List) # to get the namespace of List class
# to get all methods of that class
all_functions = inspect.getmembers(pgu.gui.List, inspect.isfunction) 

利用可能な場合は、常にソースコードを確認してください

コードから: リストを作成およびクリアできます。

class List(ScrollArea):
    """A list of items in an area.

    <p>This widget can be a form element, it has a value set to whatever item is selected.</p>

    <pre>List(width,height)</pre>
    """
    ....
    def clear(self):
        """Clear the list.

        <pre>List.clear()</pre>
        """
        ...

使用法 :

# Create the actual widget
    usagelist = gui.List(width, height)
于 2010-10-29T20:11:33.130 に答える