Module: Fzeet::ComboBoxMethods
Instance Method Summary
collapse
#append, #clear, #each, #length, #selected=
Instance Method Details
#[](i) ⇒ Object
100
101
102
103
104
105
106
107
108
109
110
111
112
|
# File 'lib/fzeet/windows/user/Control/ComboBox.rb', line 100
def [](i)
i = sendmsg(:getcursel) if i == :selected
return '' if i == -1 || (len = textlen(i) + 1) == 1
''.tap { |item|
FFI::MemoryPointer.new(:char, len) { |buf|
raise "GETLBTEXT failed." if sendmsg(:getlbtext, i, buf) == -1
item << buf.read_string
}
}
end
|
#textlen(i) ⇒ Object
98
|
# File 'lib/fzeet/windows/user/Control/ComboBox.rb', line 98
def textlen(i) raise "GETLBTEXTLEN failed." if (len = sendmsg(:getlbtextlen, i)) == -1; len end
|