docstr: Scroll the cursor position into view
docstr_tok: ["Scroll","the","cursor","position","into","view"]
code: def adjust_scroll(self):
      """Scroll the cursor position into view"""
  
      rawpos = 0
      for i in range(self.__cursor_pos):
          rawpos += self.GetFullTextExtent(self.get_text(i, i + 1))[0]
      xsize = self.Size[0] - self.padding * 2
  
      pos = self.xoffset + rawpos
      slop = pos - xsize
      if slop > 0:
          slop += self.GetFullTextExtent("M")[0]
          self.offset -= slop
          pos -= slop
          self.Refresh()
      elif pos < self.padding:
          self.offset = rawpos
          pos = self.padding
          self.Refresh()
      elif rawpos + self.GetFullTextExtent("M")[0] < xsize:
          self.offset = 0
          self.Refresh()
      if self.__caret is not None:
          pos = rawpos + self.xoffset
          self.__caret.Move(pos, self.padding)
  
imports: import wx
  import wx.lib.masked
  from cellprofiler_core.constants.measurement import C_FRAME
  from cellprofiler_core.constants.measurement import C_METADATA
  from cellprofiler_core.constants.measurement import C_SERIES
  from cellprofiler_core.constants.measurement import IMAGE
  from cellprofiler_core.preferences import get_primary_outline_color
label_desc: Use image node_id 6 for calling the MetadataControl obj's underlying member method code with example usage: obj.adjust_scroll() without return types