Ed Leafe wrote:
>       Can you give me an example of where a wizard-generated app uses 
> 'ShowColumnLabels'? I just ran the wizard, and can't find anywhere in the 
> code that the word exists
>
>   
My mistake Ed!
The DE wizard used the ShowColumnLabels internally and generates the 
warning message. I hadn't noticed the message until a little later and 
thought it was triggered by the code I was running.

While examining dGrid.py I note that you have some queries about "kind"
I managed to find these comments about it. I hope they help.

"Menu items with checkbox or radio button decorations can be created either
by using the wx.Menu methods AppendCheckItem() and AppendRadioItem(), or by
passing the kind attribute to the creator for wx.MenuItem one of the 
following val-
ues: wx.ITEM_NORMAL, wx.ITEM_CHECKBOX, or wx.ITEM_RADIO. A checkbox menu
item displays a check that automatically toggles on and off as the item 
is selected;
you do not have to manually manage that process. The start value of a 
checked
menu item is off. Radio menu items are implicitly grouped. Consecutive radio
items are considered to be part of the same group (a menu separator will 
break up
the group). By default, the topmost member of the group is checked, 
after which
selecting any member of the group automatically transfers the check to 
that item.
To programmatically check a menu item, use the wx.Menu method Check(id,
bool), where id is the wxPython ID of the item to be changed, and the 
Boolean
specifies the checked state of the item."

Example:
def createMenuItem(self, menu, label, status, handler,
                   kind=wx.ITEM_NORMAL):
    if not label:
        menu.AppendSeparator()
        return
    menuItem = menu.Append(-1, label, status, kind)
    self.Bind(wx.EVT_MENU, handler, menuItem)

...
Table 6.5  Commonly used methods of wx.ToolBar:
AddSimpleTool(id, bitmap, shortHelpString="", kind=wx.ITEM_NORMAL)

Adds a simple tool button to the toolbar, with the given bitmap.
The shortHelpString is displayed as a tooltip.
The kind can be wx.ITEM_NORMAL, wx.ITEM_CHECKBOX, or wx.ITEM_RADIO.

...
    Toggle menu items can be created using Append() by passing the kind 
param-
eter one of the constant values wx.ITEM_CHECK, wx.ITEM_NORMAL, 
wx.ITEM_RADIO, or wx.ITEM_SEPARATOR, each of which creates a menu item 
of the appropriate type.
This is helpful if you are automating the creation of the menu items 
using some
kind of data-driven process. All types of menu items can be created 
using the
same method, although to make a separator by specifying a kind of wx.ITEM_
SEPARATOR you must pass wx.ID_SEPARATOR for the id parameter.
    You can also create a toggle menu item when you use the wx.MenuItem con-
structor, by passing one of the constant values mentioned earlier to the 
kind
parameter of the constructor. The resulting menu item can be added to a menu
using any of the AppendItem(), PrependItem(), or InsertItem() family.


This is an excerpt from "wxPython in Action" by Noel Rappin and Robin Dunn
It is a well written book, available in both printed and pdf formats.
- - Fraser Burns
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to