class_docstr: A dialog for "selecting" items on a tree by checking them
class_docstr_tok: ["A","dialog","for","``","selecting","''","items","on","a","tree","by","checking","them"]
docstr: Return a bitmap with a checkbox drawn into it
  
  flags - rendering flags including CONTROL_CHECKED and CONTROL_UNDETERMINED
  width, height - size of bitmap to return
docstr_tok: ["Return","a","bitmap","with","a","checkbox","drawn","into","it","flags","-","rendering","flags","including","CONTROL_CHECKED","and","CONTROL_UNDETERMINED","width",",","height","-","size","of","bitmap","to","return"]
code: def get_checkbox_bitmap(self, flags, width, height):
      """Return a bitmap with a checkbox drawn into it
  
      flags - rendering flags including CONTROL_CHECKED and CONTROL_UNDETERMINED
      width, height - size of bitmap to return
      """
      dc = wx.MemoryDC()
      bitmap = wx.Bitmap(width, height)
      dc.SelectObject(bitmap)
      dc.SetBrush(wx.BLACK_BRUSH)
      dc.SetTextForeground(wx.BLACK)
      try:
          dc.Clear()
          render = wx.RendererNative.Get()
          render.DrawCheckBox(self, dc, (0, 0, width, height), flags)
      finally:
          dc.SelectObject(wx.NullBitmap)
      dc.Destroy()
      self.bitmaps.append(bitmap)
      return bitmap
  
file_path: CellProfiler/src/frontend/cellprofiler/gui/_tree_checkbox_dialog.py
imports: import wx
label_desc: Use image node_id 10 for calling the TreeCheckboxDialog obj's underlying member method code with example usage: obj.get_checkbox_bitmap(flags, width, height) and returns: bitmap