On 31-Jan-09, at 1:18 AM, Trisha Duke wrote:
i did what you say... it work on the mac... wonderfully...BUT on
the pc, the readonly for combobox doesn't work. it still allow to
be dropdown and selected. what can do to stop that??
You might have to just check in the events keydown and mousedown as
well on the PC and return the boolean to refuse to let the event
continue
At least those would be where'd I'd be trying to intercept things
But I see that works on OS X but on Vista the popup properly refuses
to pop down when marked read only but I can type anything into the
text area of the combo box
And you dont get keydowns :(
So what I did to my subclass of combobox was
Private mReadOnly as boolean
Private mValueLocked As string
computed property readOnly As boolean
Get
return mReadonly
Set
mValueLocked = self.Text
mReadonly = value
Event TextChanged()
#if TargetWin32
static inEvent as boolean
if inEvent then return
inEvent = true
if me.readOnly then
me.text = mValueLocked
end if
inEvent = false
#endif
End Sub
Event KeyDown(Key As String) As Boolean
if me.readOnly then return true
return Keydown(key)
End Function
Event MouseDown(X As Integer, Y As Integer) As Boolean
if me.readOnly then return true
return MouseDown(x,y)
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|