You are not logged in.

theuserbl

Intermediate

Posts: 436

Date of registration: Dec 20th 2008

  • Send private message

21

Wednesday, March 19th 2014, 10:51am

Ok, sad thing.
An

Jabaco Source

1
MsgBox sUnicodeMessage
works, but an

Jabaco Source

1
Command1.Caption = sUnicodeMessage
works not.

I will loook later at the framework again.
For none Jabaco-Components, other then the JFrame, it seems to work:

Jabaco Source

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Public Sub Command1_Click()
   sUnicodeMessage = ChrW( 3626 ) & ChrW( 3623 ) & ChrW( 3633 ) & ChrW( 3626 ) & ChrW( 3604 ) & ChrW( 3637 )
   MsgBox sUnicodeMessage
   Command1.Caption = sUnicodeMessage
   
   Dim f As New JFrame(sUnicodeMessage)
   Dim p As New JPanel()
   Dim b1 As New JButton("Button 1")
   Dim b2 As New JButton(sUnicodeMessage)
   Dim b3 As New JButton("Button 3")
   p.add(b1)
   p.add(b2)
   p.add(b3)
   f.add(p)
   f.pack()
   f.setVisible(True)
   
   Dim b4 As New JButton(sUnicodeMessage)
   b4.setBounds(10,10,100,30)
   b4.setVisible(True)
   Form1.add(b4)
   Form1.Refresh
   
End Sub


And an

Jabaco Source

1
Command1.Parent.setLabel(sUnicodeMessage)

doesn't help. :huh:

Sorry, that it still not completely works correct.
I will look at it later.

Greatings
theuserbl

theuserbl

Intermediate

Posts: 436

Date of registration: Dec 20th 2008

  • Send private message

22

Wednesday, March 19th 2014, 11:01am

Ok. The problem was only the font.

If you have the same problem on your computer, this helps:

Jabaco Source

1
2
3
4
5
6
7
Public Sub Command1_Click()
   sUnicodeMessage = ChrW( 3626 ) & ChrW( 3623 ) & ChrW( 3633 ) & ChrW( 3626 ) & ChrW( 3604 ) & ChrW( 3637 )
   Command1.Caption = sUnicodeMessage
   Dim b As New JButton()   
   Command1.Parent.setFont(b.getFont)
   
End Sub

Posts: 14

Date of registration: Mar 18th 2014

  • Send private message

23

Wednesday, March 19th 2014, 6:41pm

Thank you so much!

When I tested Jabaco back in 2010 I gave up frustrated because of this unicode bug. Yesterday I gave Jabaco a new chance (because of a non-unicode-Project) and now I just saw that you just corrected the bug! Wow, that's wonderful!!!

But I found some things:
- Frame does not offer to set the font in the properties
- Picture1.Print("test") is not working at all (either khmer nor english)
- Label has no antialiasing


BUT... How to change the font of the msgbox and the inputbox? The msgbox displays thai letters because thai letters are included in the font that is used by the msgbox. But I need to display khmer letters on a msgbox and khmer letters are not integrated in the font. so i need to change the font. but where? If i can't find a solution I have to make my own msgboxes using forms that are displayed vbModal.

theuserbl

Intermediate

Posts: 436

Date of registration: Dec 20th 2008

  • Send private message

24

Thursday, March 20th 2014, 2:18am

When I tested Jabaco back in 2010 I gave up frustrated because of this unicode bug.
For that exists this forum. If you have had asked in 2010 there would also more people who could answer. On that time OlimilO and A1880 were still active.

Quoted

Yesterday I gave Jabaco a new chance (because of a non-unicode-Project) and now I just saw that you just corrected the bug! Wow, that's wonderful!!!
Thanks. But since 2010 are some more fixes and changes done on the JabacoFramework.

Quoted

But I found some things:
- Frame does not offer to set the font in the properties
Thanks. I will look later at it.

Quoted

- Picture1.Print("test") is not working at all (either khmer nor english)
Hmmm.... there I have to look also for.
An

Jabaco Source

1
Picture1.Print("test", 10, 20)
works. And currently you have at first the CurrentX and CurrentY properties, to write only a print:

Jabaco Source

1
2
3
Picture1.CurrentX = 10
Picture1.CurrentY = 20
Picture1.Print "test"

Quoted

- Label has no antialiasing
I will look at it, if you think it would be needed. But VisualBasic haven't it, too. And if antialiasing would be added for Label, then needs the CommandButton, TextBox, etc antaliasing, too. Right? Seems to be a lot of work.


Quoted

BUT... How to change the font of the msgbox and the inputbox? The msgbox displays thai letters because thai letters are included in the font that is used by the msgbox. But I need to display khmer letters on a msgbox and khmer letters are not integrated in the font. so i need to change the font. but where? If i can't find a solution I have to make my own msgboxes using forms that are displayed vbModal.
The easiest way, is to use HTML:

Jabaco Source

1
2
sUnicodeMessage = ChrW( 3626 ) & ChrW( 3623 ) & ChrW( 3633 ) & ChrW( 3626 ) & ChrW( 3604 ) & ChrW( 3637 )
MsgBox "<html><font size=+2>This</font> <font color=red>is (" & sUnicodeMessage & ")</font> a <font face=Courier>test</a></html>"
If you don't want to use HTML, you have really to create your own MsgBox.

Greatings
theuserbl

Dani

Intermediate

Posts: 325

Date of registration: Nov 19th 2009

Location: GERMANY

  • Send private message

25

Thursday, March 20th 2014, 8:07am

Hey there,

Quoted

- Frame does not offer to set the font in the properties
works fine...




Dani

Posts: 14

Date of registration: Mar 18th 2014

  • Send private message

26

Thursday, March 20th 2014, 10:24am

hey guys

@Dani: Sorry for wasting your time. You are right. Frame supports font. Maybe I was drunk when I wrote the post ;-)

@theuserbl:

Quoted

For that exists this forum. If you have had asked in 2010 there would also more people who could answer.
Yes, I am sorry. I really don't understand why I didn't ask back then. Maybe I was thinking: This is a great project with a great future (unendless possibilities because of Java libaries but easy coding as in VB6/VBA). It was in Beta State so I guess I thought I'll wait until it gets out of Beta state. So I continued to use VB6 (fortunatly VB6 worked and works with Win7/Win8 - VB6 never dies). But now I have to write a multi platform tool. So recently I googled for the exciting project with an VB IDE that put out java code... I was a bit sad when I realized that Jabaco is still in beta status. It seems it got stuck because only the framework is open source. Hey, if I would be an millionaire (or Google or Microsoft), I would buy the code from Manuel :-)

Quoted

Picture1.Print("test", 10, 20)
Thanks, that works. But not perfect with Khmer Script. I don't know why but do you see the Khmer signs over the ':' in the screenshot? I guess you can't do anything. No Problem. I think the print-on-picture-featue isn't important.

Quoted

- Label has no antialiasing ... But VisualBasic haven't it, too

Well, not only the Label, but also the PictureBox and the Grid doesn't support antialiasing. All the other objects does. For the Label I can use a borderless Frame instead. That's a simple workaround.
For the grid I can't find a workaround.

For asian more complex scripts aa is important. You can see a big difference in the khmer example screenshot. I'd like to convert the khmer Dictionary from VB6 to Jabaco (for VB6 I am using the TimoSoft.de Unicode Controls). At least for this the grid antialiasing would be necessary.

Quoted

MsgBox "<html><font...
Thanks for this hint. It works great as you can see in the screenshot. Only the font of the TextBox inside the InputBox I can't change. For that I have to make my own Inputbox. But that's okay.


Okay, for everyone who want to test it I'll attach the Source of my example. I use the font DaunPenh which is inluded in Win7. or you can use the fontKhmerOSsys.

I was using this string: "Cambodia: " & ChrW$(&H1780) & ChrW$(&H1798 ) & ChrW$(&H17D2) & ChrW$(&H1796) & ChrW$(&H17BB) & ChrW$(&H1787) & ChrW$(&H17B6)
rucksacktraeger has attached the following image:
  • khmer.png
rucksacktraeger has attached the following file:

jbExplorer

Trainee

Posts: 111

Date of registration: Mar 18th 2013

  • Send private message

27

Thursday, March 20th 2014, 9:28pm

Thanks, theuserbl.

Theera, are you still attempting this? Let us know, if any problems.

theuserbl

Intermediate

Posts: 436

Date of registration: Dec 20th 2008

  • Send private message

28

Friday, March 21st 2014, 2:55am

Only a short answer (have not mich time)

Quoted

- Label has no antialiasing ... But VisualBasic haven't it, too

Well, not only the Label, but also the PictureBox and the Grid doesn't support antialiasing.
PictureBox supports it! Create a new PictureBox and set in the Properties "AntiAliasing" to "True". (Thats the same like with "Shape").
(Edit: The AA of the PictureBox and Shape on the one hand and the other controls on the other hand differs. Because the PictureBox and Shape using Java-AA. And the other controls using the AA of the Operating System. If you deactivate AA in your OS for fonts, then none of the controls have AA)

Quoted

All the other objects does. For the Label I can use a borderless Frame instead.
Hmm...currently don't know, why the Label is without AA. :S
And in the Jabaco-Designer, there is the Label with AA and the Frame without... :huh:

Greatings
theuserbl

This post has been edited 2 times, last edit by "theuserbl" (Mar 21st 2014, 3:10am)


Theera

Beginner

  • "Theera" is male
  • "Theera" started this thread

Posts: 21

Date of registration: Feb 27th 2014

Location: Supanburi ,Thailand

Occupation: Agric Chemical Seller

Hobbies: learning programming and English

  • Send private message

29

Friday, March 21st 2014, 4:11am

Hi jbExplorer,
I always read everyday,but I 'm busy myself. In the post#27,we can create own msgbox instead of Jabaco's.
P.S. I'm not good at English and programming,Please understand me.
Best Regards,

Theera

jbExplorer

Trainee

Posts: 111

Date of registration: Mar 18th 2013

  • Send private message

30

Friday, March 21st 2014, 10:59pm

Hi jbExplorer,
I always read everyday,but I 'm busy myself. In the post#27,we can create own msgbox instead of Jabaco's.

Hi jbExplorer,
I always read everyday,but I 'm busy myself. In the post#27,we can create own msgbox instead of Jabaco's.

Ok, sounds good. Glad to see you exploring other options.


Regards,

theuserbl

Intermediate

Posts: 436

Date of registration: Dec 20th 2008

  • Send private message

31

Saturday, March 22nd 2014, 12:30pm

- Picture1.Print("test") is not working at all (either khmer nor english)
Fixed.
Now this works:

Jabaco Source

1
2
3
4
5
6
7
8
9
10
11
12
13
14
Dim count As Integer = 0

Public Sub Form_Load()
   Picture1.Print("Hello")
End Sub

Public Sub Command1_Click()
   count = count + 1
   Picture1.Print("count: " & count)
End Sub

Public Sub Command2_Click()
   Picture1.cls
End Sub


- Label has no antialiasing
Fixed.
As always, you can download the last version at
[ http://www.jabaco.org/wiki/Latest_JabacoFramework_Binary ]

Greatings
theuserbl

theuserbl

Intermediate

Posts: 436

Date of registration: Dec 20th 2008

  • Send private message

32

Saturday, March 22nd 2014, 12:39pm

Additional info to print:

Because "Form" using "PictureBox", the things of PictureBox can also be used in Form.

So, when you set in the Properties of "Form" the "AutoRedraw" to "True", then you can now simply write

Jabaco Source

1
2
3
4
5
Public Sub Form_Load()
   For i = 1 To 10
     Print i
   Next i
End Sub

Greatings
theuserbl

Posts: 14

Date of registration: Mar 18th 2014

  • Send private message

33

Saturday, March 22nd 2014, 2:27pm

Great! works like a charm and looks good. I have tested it with all objects.

Now Jabaco is Unicode-Ready. Whole China is welcome to code in jabaco :-)

Rate this thread
WoltLab Burning Board