Get toggle state of c4d.CUSTOMGUI_BITMAPBUTTON

On 15/09/2014 at 02:34, xxxxxxxx wrote:

I have defined a CustomGui - CUSTOMGUI_BITMAPBUTTON to toggle between 2 images.
It works great, clicking on the icon will toggle between two images.

The question is now, how can I read to the customgui container (below bbcH) to get the current state of the toggle, or get the information on which image is set?
At this moment I'm using a variable to keep track of the toggle state, but getting it from the container or somewhere else makes more sense to me?

        bbcH = c4d.BaseContainer()                             
        bbcH.SetBool(c4d.BITMAPBUTTON_BUTTON, True)
        bbcH.SetBool(c4d.BITMAPBUTTON_TOGGLE, True)
        bbcH.SetLong(c4d.BITMAPBUTTON_ICONID1, imageIDHOff)          #Off state:         H
        bbcH.SetLong(c4d.BITMAPBUTTON_ICONID2, imageIDH)             #On State:          H
        bbcH.SetString(c4d.BITMAPBUTTON_TOOLTIP, "Rotation.H")
        self.buttonH = self.AddCustomGui(MYBUTTONH, c4d.CUSTOMGUI_BITMAPBUTTON, "", c4d.BFH_LEFT, 0, 0, bbcH)