My first post here, so greetings to everybody and the best health wishes in these complicated times.
I just realised that TextField and TextArea borders can be only enabled/disabled in the IDE, not on the fly. Tested with 2019r3, Mac and Windows using old .border and new .HasBorder syntax.
Is this a bug or it’s due to some OS limitation ?
Tested also with 2019R1, 2018R4 and 2017R2 on Mac, same situation.
Nevertheless border can be shown/hidden on demand using NSTextFieldMBS bordered property, so seems not a OS limitation, at least on Mac.
Would be great if this could be sorted at some point.
April 7, 2020, 11:09pm
Can you create a feedback report (bug or feature request)?
The LR does not say it is limited to be set in the IDE. It looks terribly much like a bug. unless it is an LR bug.
Do file a feedback report, with a small project demonstrating the issue.
Thanks both for the reply.
Seems that this has been reported and verified … in 2011.
Norman suggested there a workaround for MacOs, it works
declare sub setBezeled lib “Cocoa” selector “setBezeled:” (handle as integer, value as boolean)
// Usage : setBezeled(TextField1.Handle, value)
if TextField1.Border then
TextField1.Border = False
TextField1.Border = True
I tried the declare on Textarea, it does nothing.
one is probably and NSTextField and the other an NSTextView and they respond differently to different selectors
that one may have no applicability to the NSTextView
Yes, only for a TextField.
Shame this can’t be adjusted in Windows…
It should be possible to do declares in Windows.
Since every control in Windows is considered a window by the framework, this should work on a Textarea/textfield:
Perhaps some iteration of this, I use to remove the border of a window:
Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (hwnd As Integer, nIndex As Integer, dwNewLong As Integer) As Integer
Const GWL_STYLE = -16
dim rien as integer = SetWindowLong(self.handle, GWL_STYLE, &H800000)
JulianS may already have that in his bag of tricks