Can't get this function working, does any body know where I'm wrong ?
@term = Wx::TextCtrl.new(@skin, -1, 'Paste URL Here', :pos => [25,100],
:size => [300,20]) #, :style => Wx::NO_BORDER)
@term.evt_set_focus() {|event| on_term_focus(event) }
def on_term_focus(event)
if @term.get_value == "Paste URL Here"
@term.set_value("")
else
@term.set_selection(-1,-1) #<---- DON'T WORK
end
end
on 2010-10-08 17:07
on 2010-10-08 18:37
try to skip:
def on_term_focus(event)
if @term.get_value == "Paste URL Here"
@term.set_value("")
else
@term.set_selection(-1,-1)
end
evt.skip()
end
hth
bio.
on 2010-10-14 13:50
> @term.set_selection(-1,-1) #<---- DON'T WORK > Hi Rob, I have the same problem with a ListCtrl Object, and the solution for me is to REFRESH the ListCtrl after the selection: > ListCtrl#set_item_state( ) > ListCtrl#refresh_items( ) I hope it helps FELIPE
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.