Jump to content


Photo

NxHtmlColumn with Unicode?


  • Please log in to reply
18 replies to this topic

#1 Andre Felix

Andre Felix
  • Members
  • 28 posts
  • Gender:Male
  • Location:Sydney, Australia

Posted 16 August 2007 - 03:32 AM

I'm testing the capability of NextGrid with Unicode.
The NextGrid works fine, is very fast and small, but the Unicode works well on a TextualColumn but not on a NxHtmlColumn, is that correct?
Thanks

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,196 posts
  • Gender:Male

Posted 16 August 2007 - 04:00 AM

Hello Andrefm,

You are correct, I have fix it.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 Andre Felix

Andre Felix
  • Members
  • 28 posts
  • Gender:Male
  • Location:Sydney, Australia

Posted 16 August 2007 - 04:20 AM

With that fast answer... the solution was to buy the excelent component collection ;)
Thanks

QUOTE (Boki (Berg) @ Aug 16 2007, 04:00 AM) <{POST_SNAPBACK}>
Hello Andrefm,

You are correct, this will be fixed tomorow.

Best regards


#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,196 posts
  • Gender:Male

Posted 16 August 2007 - 04:25 AM

Hello Andrefm,

I allways trying to answer as soon as possible.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#5 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,196 posts
  • Gender:Male

Posted 16 August 2007 - 04:35 AM

Hello,

Here is a fix. Open NxDisplays.pas file (located in Sources\Next Grid sub-folder).

Locate next procedure:

CODE
THtmlColumnDisplay.DrawHTML(HTML: WideString);


Add sub-procedure:

CODE
  procedure DrawTextOut(X, Y: Integer; Text: WideString);
  var
    StrText: string;
  begin
    if IsUnicodeSupported then Windows.ExtTextOutW(Canvas.Handle, X, Y, 0, nil,
      PWideChar(Text), Length(Text), nil) else
    begin
      StrText := Text;
      Windows.ExtTextOut(Canvas.Handle, X, Y, 0, nil, PChar(StrText),
        Length(StrText), nil);
    end;
  end;


Then, replace inside main procedure Canvas.TextOut with DrawTextOut (procedure we just created).

I hope that this is it smile.gif
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#6 Andre Felix

Andre Felix
  • Members
  • 28 posts
  • Gender:Male
  • Location:Sydney, Australia

Posted 16 August 2007 - 01:56 PM

Boki,
The version that i downloaded yesterday was allready with that fix.
Thank You
Andre


QUOTE (Boki (Berg) @ Aug 16 2007, 04:35 AM) <{POST_SNAPBACK}>
Hello,

Here is a fix. Open NxDisplays.pas file (located in Sources\Next Grid sub-folder).

Locate next procedure:

CODE
THtmlColumnDisplay.DrawHTML(HTML: WideString);


Add sub-procedure:

CODE
  procedure DrawTextOut(X, Y: Integer; Text: WideString);
  var
    StrText: string;
  begin
    if IsUnicodeSupported then Windows.ExtTextOutW(Canvas.Handle, X, Y, 0, nil,
      PWideChar(Text), Length(Text), nil) else
    begin
      StrText := Text;
      Windows.ExtTextOut(Canvas.Handle, X, Y, 0, nil, PChar(StrText),
        Length(StrText), nil);
    end;
  end;


Then, replace inside main procedure Canvas.TextOut with DrawTextOut (procedure we just created).

I hope that this is it smile.gif


#7 Andre Felix

Andre Felix
  • Members
  • 28 posts
  • Gender:Male
  • Location:Sydney, Australia

Posted 16 August 2007 - 02:37 PM

BUT, now another small problem.
When I use <b> </b> in part of the unicode text, and use some simbols like ☆☆☆ the grid don't shows the text correctly.
example: ☆☆☆☆☆ <b>ANDRE</b> ☆☆☆☆☆☆
(I use the font Lucida Sans Unicode)

Andre


QUOTE (andrefm @ Aug 16 2007, 01:56 PM) <{POST_SNAPBACK}>
Boki,
The version that i downloaded yesterday was allready with that fix.
Thank You
Andre


#8 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,196 posts
  • Gender:Male

Posted 16 August 2007 - 02:38 PM

Hello Andre,

I will check it now, I hope that it is something easy.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#9 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,196 posts
  • Gender:Male

Posted 16 August 2007 - 02:43 PM

Hello Andre,

I have try it with TNT Edit, and it seems that it can't display it too blink.gif

regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#10 Andre Felix

Andre Felix
  • Members
  • 28 posts
  • Gender:Male
  • Location:Sydney, Australia

Posted 16 August 2007 - 02:48 PM

Hello Boki
no problem... at the moment i can try to use only the color change.

One more ( i'm just trying to help to find the bugs ;) ). Ok I don't know if it's a bug, but please check:

When I use:
TEXT1 <font color="#0000cc"><b>TEXT2</b></font> TEXT3

The TEXT3 is blue and don't use the normal color.

In my case I can "fix" using:
<font color="#000000">TEXT1</font> <font color="#0000cc"><b>TEXT2</b></font> <font color="#000000">TEXT3</font>

Thanks in advance

Andre


QUOTE (Boki (Berg) @ Aug 16 2007, 02:38 PM) <{POST_SNAPBACK}>
Hello Andre,

I will check it now, I hope that it is something easy.

Best regards


#11 Andre Felix

Andre Felix
  • Members
  • 28 posts
  • Gender:Male
  • Location:Sydney, Australia

Posted 16 August 2007 - 02:51 PM

ops... sad.gif when i change only the color instead of <b> it happens the same problem sad.gif


QUOTE (andrefm @ Aug 16 2007, 02:48 PM) <{POST_SNAPBACK}>
Hello Boki
no problem... at the moment i can try to use only the color change.

One more ( i'm just trying to help to find the bugs wink.gif ). Ok I don't know if it's a bug, but please check:

When I use:
TEXT1 <font color="#0000cc"><b>TEXT2</b></font> TEXT3

The TEXT3 is blue and don't use the normal color.

In my case I can "fix" using:
<font color="#000000">TEXT1</font> <font color="#0000cc"><b>TEXT2</b></font> <font color="#000000">TEXT3</font>

Thanks in advance

Andre


#12 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,196 posts
  • Gender:Male

Posted 16 August 2007 - 02:56 PM

Hello Andre,

I will try to find fix for this now.

I will also upgrade html column in next days.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#13 Andre Felix

Andre Felix
  • Members
  • 28 posts
  • Gender:Male
  • Location:Sydney, Australia

Posted 17 August 2007 - 02:45 AM

Boki,
Another thing to check is the size of font and font name. One of both seens to change when I use some HTML code.
thanks
Andre

The problem is another one... Sometimes I use only:
<font color="#595959">
and other times was:
<font name="Lucida Sams Unicode" color="#595959">

But it's the same font that i use in NextGrid. Maybe when I set the font name I have to set the font size?



QUOTE (Boki (Berg) @ Aug 16 2007, 02:56 PM) <{POST_SNAPBACK}>
Hello Andre,

I will try to find fix for this now.

I will also upgrade html column in next days.

Best regards


#14 Andre Felix

Andre Felix
  • Members
  • 28 posts
  • Gender:Male
  • Location:Sydney, Australia

Posted 18 August 2007 - 05:25 PM

Boki,
I have installed now the new version, but i didn't find the "{$IFDEF TNTUNICODE}, TntStdCtrls {$ENDIF};" on NxEdit.pas. Is no more needed?
Regards,
Andre

QUOTE (andrefm @ Aug 17 2007, 02:45 AM) <{POST_SNAPBACK}>
Boki,
Another thing to check is the size of font and font name. One of both seens to change when I use some HTML code.
thanks
Andre


#15 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,196 posts
  • Gender:Male

Posted 18 August 2007 - 05:27 PM

Hello Andre,

Now is all in NxClasses.pas smile.gif

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#16 Andre Felix

Andre Felix
  • Members
  • 28 posts
  • Gender:Male
  • Location:Sydney, Australia

Posted 18 August 2007 - 05:52 PM

Boki,

Very Nice ;)

Is not possible to add a checkbox on installer for NX_DEBUG and TNTUNICODE? I know that I want to many things.. laugh.gif But it would be nice. I don't know if it's a good idea about the NX_DEBUG, but for TNTUNICODE....

Coming back about the NxHtmlColumn. It works for the symbols, but still have problems sad.gif with some simbols and HTML code. As you can see, only when I add a HTML colde (to change de color), then i have that type of problem.



Regards,
Andre

QUOTE (Boki (Berg) @ Aug 18 2007, 05:27 PM) <{POST_SNAPBACK}>
Hello Andre,

Now is all in NxClasses.pas smile.gif

Best regards


#17 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,196 posts
  • Gender:Male

Posted 18 August 2007 - 05:56 PM

Hello Andre,

I will try to made this. I hope that it is possible to do this with Inno Setup (which I use for installer).

Can you please give me sample code you use for html column in your app. Somehow I can't get this special chars.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#18 Andre Felix

Andre Felix
  • Members
  • 28 posts
  • Gender:Male
  • Location:Sydney, Australia

Posted 18 August 2007 - 07:34 PM

Boki,

Sorry for the late answer, but i have other things here to do.
About that simbols, I know that it's dificult to simulate. I'm using a webbrowser to read and add simbols like that in DB.
Please see the file:
maindemo_source.zip
If you want, you can put the value stored in grid on a TNTEdit to take a better look...

Regards,

Andre

#19 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,196 posts
  • Gender:Male

Posted 18 August 2007 - 07:38 PM

Hello Andre,

I will check it now. Thank you. When I have some results, I'b be back here.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users