Log in

View Full Version : Disable onclick for list items?


xarragon
April 28th, 2010, 01:39 AM
Hello again. I use a list to do alot of menus (since it can retain a highlighted item when not in focus, useful for many purposes). However, these seems to require an onclick handler in each item in the static content, or it won't show any content at all. However, I don't use them for clicking, so I disable them by installing a null Python handler:

<content>
<item id="400">
<label>$LOCALIZE[5000]</label>
<onclick lang="python"><![CDATA[]]></onclick>
</item>
<item id="401">
<label>$LOCALIZE[5010]</label>
<onclick lang="python"><![CDATA[]]></onclick>
</item>
</content>
If I just use a hyphen it seems to default to showing some sort of playback menu/dialog. Is there some explicit action to tell it to do nothing short of the above Python hack? Perhaps I should do away with the list control alltogether for these purposes?

DPK
April 28th, 2010, 06:57 AM
What are you using this list for?

riegersn
May 2nd, 2010, 10:36 PM
Toggle buttons can have alternate focus states, as well as alternate labels, onclick. No need to use a list.