6/20/2025 10:35:46 AM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
|
|
|
|
Wrapping and the memo control
Posted: 06 Sep 07 2:01 PM
|
Is there any way to programmatically determine if the text is long enough to wrap when placed into the memo field? This is a separate issue from the wrapping property. Basically, I have set a control's height at 21, and if the text is long enough to wrap, I want to be able to make it grow by setting height to 42 and so on. Basically I want it to work like the To field in Outlook email expands when adding multiple email addresses.
Thank you. |
|
|
|
Re: Wrapping and the memo control
Posted: 06 Sep 07 4:06 PM
|
You could just evaluate the length of the text property of the control on the WhenChange event of the memo field, and adujst the height accordingly?
Somthing like
If len(memo.text) < 100 then memo.height = 21 ElseIF len(memo.text) < 200 then memo.height = 42 elseIf len(memo.text < 300 then memo.height = 84 elseif 'etc...
end if
Kindof a pain, beacuse you would have to account for each potential "growth" of the memo field. Also IIRC, having somthing like that on the whenchange event might slow things down a little, but it might be worth a try.
|
|
|
|
Re: Wrapping and the memo control
Posted: 06 Sep 07 8:50 PM
|
Yes, Jason, that is pretty much the path I am taking since I didn't figure I'd find another way. The only difficult part of that is that with proportionately spaced fonts, the length can be different every time, but I'm going to go with this. I am taking the string length and dividing it by the assumed length to get a multiplier of how many lines I might need, and then adding the product of the multiplier * the per line height addon (which I found is something like 10-15) to the height. It won't be perfect, but better than nothing. Thanks for your input. |
|
|
|
Re: Wrapping and the memo control
Posted: 07 Sep 07 1:40 PM
|
Hey, maybe a little more input should be too bad. You can change the font on the control, so you can choose a font with even spacing for each letter. That should help out a bit. I looked at a few fonts, and it seems Courier will do the trick. |
|
|
|
Re: Wrapping and the memo control
Posted: 07 Sep 07 1:44 PM
|
Yes, Courier is a fixed width font, but personally, it is too ugly for me to allow its use.
I've actually got it working quite well. |
|
|
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|