Hello !
Any body can explain how to set the max characters limit in a TextEdit box? I tried to reimplement the #maxTextLimit method, but it doesn´t fix my problem properly. Thanks, Santiago |
Santiago,
> Any body can explain how to set the max characters limit in a > TextEdit box? > > I tried to reimplement the #maxTextLimit method, but it doesn´t fix my > problem properly. What are you trying to set it to? i.e. have you seen the comment for TextEdit>>textLimit ... textLimit: anInteger "Set the maximum text limit for the receiver. The initial default limit is around 32kb. N.B. The maximum limits are as follows: Single Line NT - 0x7FFFFFFE 95/98 - 16r7FFE (i.e. less than 32kb). Multiline NT - 16rFFFFFFFF 95/98 - 16rFFFF" The maximum limits are Windows defined and cannot be exceeded even if you change #maxTextLimit. If you are using 95/98 and need more room then you will probably have to use a RichTextEdit which has, according to it's comment, around the same limit as NT above. Regards Ian |
I need to set the limit to 30 characters, because 30 is the size of
the field on the DataBase. I saw another thing: If you set the property isStatic: true, but the property isTabStop is true too, you can get inside the textField with the tab key and edit the text. Is this a bug? Thanks, Santiago Ian Bartholomew wrote: >Santiago, > >> Any body can explain how to set the max characters limit in a >> TextEdit box? >> >> I tried to reimplement the #maxTextLimit method, but it doesn´t fix my >> problem properly. > >What are you trying to set it to? i.e. have you seen the comment for >TextEdit>>textLimit ... > >textLimit: anInteger > "Set the maximum text limit for the receiver. The initial default limit >is around 32kb. > N.B. The maximum limits are as follows: > Single Line > NT - 0x7FFFFFFE > 95/98 - 16r7FFE (i.e. less than 32kb). > Multiline > NT - 16rFFFFFFFF > 95/98 - 16rFFFF" > >The maximum limits are Windows defined and cannot be exceeded even if you >change #maxTextLimit. If you are using 95/98 and need more room then you >will probably have to use a RichTextEdit which has, according to it's >comment, around the same limit as NT above. > >Regards > Ian > > > > > > > |
Santiago,
> I need to set the limit to 30 characters, because 30 is the size of > the field on the DataBase. Oh, got you. I thought you wanted to raise the limit. Just send #textLimit to your view once it is created... aTextPresenter view textLimit: 30 > If you set the property isStatic: true, but the property isTabStop is > true too, you can get inside the textField with the tab key and edit > the text. > > Is this a bug? From a quick peek it looks like Dolphin asks Windows for the next view to tab to (see View>>tabNextSiblingFrom:forward:) so if Windows answers a view with the Static flag set then I guess it is just giving the TabStop flag precedence over the Static flag. Whether this is wrong (it might be deliberately specified in that way somewhere?) and/or whether Dolphin should trap/prevent it - <shrug>. Having the #isStatic attribute automatically adjust the #isTabStop and #isReadOnly attributes would be possible, as would adding a test to the above method, but whether it is worth it? Regards Ian |
In reply to this post by Santiago Cardoso Geller-2
Santiago,
> I need to set the limit to 30 characters, because 30 is the size of > the field on the DataBase. Oh, got you. I thought you wanted to raise the limit. Just send #textLimit to your view once it is created... aTextPresenter view textLimit: 30 > If you set the property isStatic: true, but the property isTabStop is > true too, you can get inside the textField with the tab key and edit > the text. > > Is this a bug? >From a quick peek it looks like Dolphin asks Windows for the next view to tab to (see View>>tabNextSiblingFrom:forward:) so if Windows answers a view with the Static flag set then I guess it is just giving the TabStop flag precedence over the Static flag. Whether this is wrong (it might be deliberately specified in that way somewhere?) and/or whether Dolphin should trap/prevent it - <shrug>. Having the #isStatic attribute automatically adjust the #isTabStop and #isReadOnly attributes would be possible, as would adding a test to the above method, but whether it is worth it? Regards Ian |
Free forum by Nabble | Edit this page |