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.

Dani

Intermediate

  • "Dani" started this thread

Posts: 325

Date of registration: Nov 19th 2009

Location: GERMANY

  • Send private message

1

Thursday, December 22nd 2011, 10:30am

JBDialog - StartupLocation

Hey everybody,

when initializing a Jabaco Dialog (Dialog1.BorderStyle = vbFixedSingle)

Jabaco Source

1
2
3
4
Dim Dialog2 As New Dialog1
   Dialog2.Parent.setSize(500,500)
   Dialog2.Parent.setLocationRelativeTo(Me)
   Dialog2.Show(1)


On Windows it will popup right above its owner Form1
On the Mac it will poup in the upper left corner of the screen and jump to the desired location!

Very disturbing behaviour! (Same with a Jabaco Form by the way!)

Now when the same Dialog is borderless (Dialog1.BorderStyle = vbBSNone) everything is fine on the Mac too!?

When I use the JDialog

Jabaco Source

1
2
3
4
5
6
Dim Dialog2 As New JDialog(Me)
   Dialog2.pack()
   Dialog2.setSize(500,500)
   Dialog2.setLocationRelativeTo(Me)
   Dialog2.setModal(True)
   Dialog2.setVisible(True)


I get the expected behavior (popup above its owner) on Windows and Mac!

I found this in the framework, but I am not even sure if I'm in the right spot here.
http://www.google.com/codesearch#pOD0Tthq4jU/trunk/Framework/src/VB/Dialog.jsrc&q=dialog%20package:[url]http://jabacoframework\.googlecode\.com&l=66[/url]

Jabaco Source

1
2
3
4
5
6
7
8
9
10
11
12
' **************** // BAD HACK * I DONT KNOW A BETTER SOLUTION AT THE MOMENT :(
   Parent.setLocation -30000, -30000
   Parent.setVisible True
   Height = Height + (StartHeight - Parent.getContentPane.getHeight)
   Width = Width + (StartWidth - Parent.getContentPane.getWidth)

   Call Me.Form_Load()
   Call DoEvents()
   If myMenuBar.Visible Then Me.Height = Me.Height + myMenuBar.Height
   If myToolBar.Visible Then Me.Height = Me.Height + myToolBar.Height
   Parent.setVisible False
   ' **************** // BAD HACK


It would be great if someone came up with a fix for this issue!

Dani

Rate this thread
WoltLab Burning Board