CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Justification

by jredoc » 07 Dec 2013 19:53

Is there a mechanism to turn off justification in the JQMemoEx component?

Using IWCGJQMemoExPtChanges.Lines.Add(); I would like to be able to create columns of characters with the first character of each column aligned directly below the first character of the character string above. To accomplish this I need to be able to insert both spaces and characters and have each occupy the same amount of horizontal space.

TIA

John
jredoc
 
Posts: 125
Joined: 11 Jun 2013 03:34

by Jorge Sousa » 07 Dec 2013 20:46

Hi John

I don't think it's a problem of justification, the text-justification,

you need font with fixed size per character, like Courier

or working with tabs, but in readonly mode, i think users can't input tabs into Memo

or even change to HMLEditor an work work with HTML
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by jredoc » 08 Dec 2013 21:37

I would prefer to use the memo component for several reasons, one reason being that I see no way to make the HTML toolbar invisible to the user when using the HTML component.

I went to the supertextarea documentation site, but the link to the documentation was broken. Could you please explain the mechanism to add a fixed size font to the IWCGJQMemoEx component?

TIA

John
jredoc
 
Posts: 125
Joined: 11 Jun 2013 03:34

by Jorge Sousa » 08 Dec 2013 23:29

Hi

Set Font.Enabled = True and define the font properties.
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by jredoc » 09 Dec 2013 21:08

I got that.

My problem ( based on the earlier discussion in this thread ) is that I need to display the text in the memo with a fixed space font and none appear in the IWCGJQMemoEx.Font.FontFamily property. I have included the following code in the OnCreate event for the IWCGJQMemoEx but it does not appear to for utilization of the Courier New font which I have on my development machine.

var
tempFont: TFont;
begin
tempFont := TFont.Create;
tempFont.Name := 'Courier New';
with IWCGJQMemoExPtChanges.Font do
begin
Enabled := True;
FontFamily := 'Courier New';
Font := tempFont;
Size := 10;
end;


So the question becomes as stated earlier, what is the mechanism to force the IWCGJQMemoEx to utilize a courier new font?

TIA

John
jredoc
 
Posts: 125
Joined: 11 Jun 2013 03:34

by Jorge Sousa » 10 Dec 2013 01:07

Hi

I'm sorry, my answer was wrong, setting the Font only applies to container and in this case, the textarea is not getting the container font:

Do this

IWCGJQMemoEx.MemoStyle.Add('font-family:courier');

PS: Unfortunatelly, you cannot do this:

IWCGJQMemoEx.MemoStyle.Add('font-family:courier new');

Until next version, because right now, there is a code, cutting all the space, so "courier new" becomes "couriernow"
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58


Return to JQMemoEx

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.