Combobox lostfocus problem - is this a bug?
Posted: Thu May 10, 2012 7:06 pm
Hi
Please consider this sample.
While running, just press <tab> and the focus will move to the second control. But, I think it should be in the first control itself. Is this a bug?
Please consider this sample.
Code: Select all
#include <hmg.ch>
Function Main
define window sample at 0, 0 width 300 height 300 main
define combobox one
row 10
col 10
width 100
on lostfocus do_one()
end combobox
define textbox two
row 40
col 10
width 100
on lostfocus do_two()
end textbox
end window
sample.one.additem( 'One' )
sample.one.additem( 'Two' )
sample.center()
sample.activate()
Return
function do_one
if sample.one.value == 0
sample.one.setfocus()
endif
return nil
function do_two
if len( alltrim( sample.two.value ) ) == 0
sample.two.setfocus()
endif
return nil
While running, just press <tab> and the focus will move to the second control. But, I think it should be in the first control itself. Is this a bug?