Robert May schrieb:
Kind, Uwe (AGIS) wrote:
If you don't have the possibility to build the module, you will have to
wait until an official patch is available. I've created an entry in the
bug tracker for this issue.
If you have a C-compiler readily to hand, then download the source-
distribution, go to Combobox.xs file and replace the code of SetEditSel
with the following lines:
------------------------------------------------------------------------
###################################################################
# (@)METHOD:SetEditSel(START,END)
# Select characters in the textfield.
LRESULT
SetEditSel(handle,start,end)
HWND handle
WPARAM start
WPARAM end
PREINIT:
LPARAM sel = end * 0x10000 + start;
CODE:
RETVAL = SendMessage(handle, CB_SETEDITSEL, 0, sel);
OUTPUT:
RETVAL
Oops, I just added this from uwe to the upcoming cygwin release, which
is on the way upstream.
Your better suggestion below came too late for me, sorry.
------------------------------------------------------------------------
I propose the following:
###############################################################
# (@)METHOD:SetEditSel(START,END)
# Select characters in the textfield. START and END are the
# (zero-based) index of the characters to be selected. START
# is the index of the first character to be selected, and END
# is the index of the first character following the selection.
# For example to select the first 4 characters:
#
# $combobox->SetEditSel(0,4);
#
# If START is -1, the any selection is removed. If END is -1,
# then the selection is from START to the last character in the
# textfield.
#
# Returns 1 on success, 0 on failure and -1 if sent to a
# Combobox that does not have a textfield (C<-dropdownlist => 1>).
LRESULT
SetEditSel(handle,start,end)
HWND handle
UINT start
UINT end
CODE:
RETVAL = SendMessage(handle, CB_SETEDITSEL, 0, MAKELPARAM(start, end));
OUTPUT:
RETVAL
I think that is equivalent.
--
Reini Urban
http://phpwiki.org/ http://murbreak.at/
http://helsinki.at/ http://spacemovie.mur.at/