You are not logged in.

Dear visitor, welcome to Jabaco - Community. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

birosys

Trainee

  • "birosys" is male
  • "birosys" started this thread

Posts: 48

Date of registration: Feb 9th 2009

Location: Mladenovac, Serbia

Occupation: Programming

Hobbies: Programming

  • Send private message

1

Wednesday, February 11th 2009, 2:08am

ContentFrame problem

Hi guys
Why ContentFrame of form dont draw java control on it?
When i set ContentFrame.Visible to False, i got a control on form.
Control name is Quick Table.
If someone want to use this control, here is sample working code:

Jabaco Source

1
2
3
4
5
6
7
8
9
10
11
12
13
Public Sub Form_Load()
   Dim Con As Class
   Dim dbTable1 As quick#dbtable#DBTable = New quick#dbtable#DBTable()
   Dim rs As ResultSet 
   con=class.forName("org.firebirdsql.jdbc.FBDriver")
   me.add(dbTable1, BorderLayout.CENTER)
   Database1.Connect ("jdbc:firebirdsql:localhost/3050:/Program Files/Firebird/Firebird_2_1/examples/empbuild/EMPLOYEE.FDB", "sysdba", "masterkey")
   rs=database1.ExecuteStatement("Select * from Customer")
   dBTable1.createControlPanel ()
   dbTable1.refresh (rs) 
   Me.ContentFrame.Width=0
   Me.ContentFrame.Height=0
End Sub


and a picture from JABACO is in attachment!

Milan
birosys has attached the following image:
  • TestQuickGrid.png

birosys

Trainee

  • "birosys" is male
  • "birosys" started this thread

Posts: 48

Date of registration: Feb 9th 2009

Location: Mladenovac, Serbia

Occupation: Programming

Hobbies: Programming

  • Send private message

2

Wednesday, February 11th 2009, 2:48pm

My answer to my post.
When adding new JAVA control to form, component container is form itself. But ContentFrame, where we draw JABACO
component is VB#Picture, and she cannot be container for JAVA component.
The solution is to set Form.ContentFrame.Opaque=False. This will set ContentFrame to be transparent, and we now can
combine Java and Jabaco controls. Here is sample code and picture of it.

Jabaco Source

1
2
3
4
5
6
7
8
9
10
11
12
13
14
Dim Con As Class
   Dim dbTable1 As quick#dbtable#DBTable = New quick#dbtable#DBTable()
   Dim rs As ResultSet 
   con=class.forName("org.firebirdsql.jdbc.FBDriver")
   'Add control on form without layot manager
   me.add(dbTable1)
   Me.ContentFrame.Opaque=False
   Database1.Connect ("jdbc:firebirdsql:localhost/3050:/Program Files/Firebird/Firebird_2_1/examples/empbuild/EMPLOYEE.FDB", "sysdba", "masterkey")
   rs=database1.ExecuteStatement("Select * from Customer")
   dBTable1.createControlPanel ()
   dbTable1.refresh (rs) 
   'Set control position and size
   dbtable1.setBounds(100,100,500,300)
   dbtable1.updateUI


Good luck, and keep posting your samples and pictures of your work!

Milan
birosys has attached the following image:
  • Test1.png

OlimilO

Intermediate

  • "OlimilO" is male

Posts: 277

Date of registration: Jan 18th 2009

Location: Germany

Occupation: software engineer

  • Send private message

3

Wednesday, February 11th 2009, 3:11pm

Hi Milan

Ah cool :)

its good to know thanks

OlimilO

htillmann

Beginner

  • "htillmann" is male

Posts: 30

Date of registration: Feb 25th 2009

Location: Beverungen / Weser

Occupation: Softwareentwicklung

  • Send private message

4

Friday, February 27th 2009, 12:48pm

Hi Milan,

nice tool. Do you have any examples in Jabaco Code for
updating, printing etc. like it is in the sample files of quicktable?

I also try to format the columns but up to now without success.

Friendly regards

Hubertus

Rate this thread
WoltLab Burning Board