user1430431
user1430431

Reputation: 45

How to disable a toolbar LabelTool in wxpython

I have created a LabelTool item in a toolbar. I want to know how to disable this item.

Upvotes: 2

Views: 809

Answers (1)

Mike Driscoll
Mike Driscoll

Reputation: 33071

Why would you disable a label? Labels are only for viewing purposes. The user cannot interact with them anyway.

EDIT: It looks like Robin Dunn answered a similar question (maybe yours?) on the wxPython mailing list today: https://groups.google.com/forum/?fromgroups#!topic/wxpython-users/eO9GXO8R6eM

He gave the following example:

toolbar.EnableTool(toolId, True)  # or False to disable 

Which is the code you would use to Enable / Disable any tool bar widget

Upvotes: 1

Related Questions