Method: CDK::RADIO#fixCursorPosition

Defined in:
lib/cdk/components/radio.rb

#fixCursorPositionObject

Put the cursor on the currently-selected item.



127
128
129
130
131
132
133
134
# File 'lib/cdk/components/radio.rb', line 127

def fixCursorPosition
  scrollbar_adj = if @scrollbar_placement == CDK::LEFT then 1 else 0 end
  ypos = self.SCREEN_YPOS(@current_item - @current_top)
  xpos = self.SCREEN_XPOS(0) + scrollbar_adj

  @input_window.wmove(ypos, xpos)
  wrefresh(@input_window)
end