Re: Win32Lib - addStyle/removeStyle
On Thu, 13 Mar 2003 07:48:09 +1100, Derek Parnell <ddparnell at bigpond.com>
wrote:
>
> ----- Original Message -----
> From: "Jonas Temple" <jtemple at yhti.net>
> To: "EUforum" <EUforum at topica.com>
> Subject: Win32Lib - addStyle/removeStyle
>
>
>> Anyone have any experience with addStyle/removeStyle? What I'm wanting
>> to do is add/remove the ES_READONLY style from a rich edit during
>> program execution.
>>
>> When I use these routines nothing happens. I've tried using setEnable()
>> but if the control is disabled the scroll bar is also disable, therefore
>> the user cannot scroll down through the text.
>>
>> Any suggestions?
Actually there is another method that I use that has the same effect.
procedure KeyPress_RE(integer self, integer event, sequence parms)
if equal(getUserProperty(self, "ReadOnly"), {True}) then
returnValue(-1)
end if
end procedure
setHandler(RE, w3HKeyPress, routine_id("KeyPress_RE"))
defineUserProperty(RE, "ReadOnly", False)
. . . if NeedsReadOnly then
setUserProperty(RE, "ReadOnly", True)
end if
--
cheers,
Derek Parnell
|
Not Categorized, Please Help
|
|