Total Pageviews

Saturday, May 31, 2014

នេះជា Type PickerWidget របស់ Corona SDK

នេះជា Type PickerWidget របស់ Corona SDK
សំរាប់ PickerWheel objects ត្រូវបានបង្កើតឡើងដោយការប្រើ widget.newPickerWheel()
នេះជា Methods របស់វា
Object:getValues() ប្រើសំរាប់ត្រឡប់ជា table ជាមួយនឹង currently selected value/index នៃគ្រប់ទាំង column នៅក្នុង picker wheel
Syntax: object:getvalues()
សូមមើលកូដះ
-- Get the table of current values for all columns
-- This can be performed on a button tap, timer execution, or other event
local values = pickerWheel:getValues()
-- Get the value for each column in the wheel (by column index)
local currentMonth = values[1].value
local currentDay = values[2].value
local currentYear = values[3].value
print( currentMonth, currentDay, currentYear )


No comments:

Post a Comment