Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, June 20, 2025 
 
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!
 Architect Forums - SalesLogix Scripting & Customization
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.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Wrapping and the memo control
Paul VanderWaal
Posts: 23
 
Wrapping and the memo controlYour last visit to this thread was on 1/1/1970 12:00:00 AM
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.
[Reply][Quote]
Jason Buss
Posts: 382
 
Re: Wrapping and the memo controlYour last visit to this thread was on 1/1/1970 12:00:00 AM
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.


[Reply][Quote]
Paul VanderWaal
Posts: 23
 
Re: Wrapping and the memo controlYour last visit to this thread was on 1/1/1970 12:00:00 AM
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.
[Reply][Quote]
Jeff Weight
Posts: 219
 
Re: Wrapping and the memo controlYour last visit to this thread was on 1/1/1970 12:00:00 AM
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.
[Reply][Quote]
Paul VanderWaal
Posts: 23
 
Re: Wrapping and the memo controlYour last visit to this thread was on 1/1/1970 12:00:00 AM
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.
[Reply][Quote]
 Page 1 of 1 
  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!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 6/20/2025 6:47:25 AM