Navigator form width problem

Questions and answers for designing and implementing forms in Servoy

Navigator form width problem

Postby Mark Crichton » Tue Mar 20, 2012 1:04 pm

Hi

I have a control form which has buttons which load 5 other sub-forms all with the same navigator form. Each time I click a button to load a sub-form the width of the navigator increases by 4 pixels. This is a pain as it gets wider and wider reducing right panel's space. going from sub-form to sub-form is ok.

This all happens in Smart Client. Web client is ok.
Any ideas on what tis is happening would be appreciated.
Is there a way to set the navigator forms width back to 180 width ?

I am using getFormWidth to show me the 4 pixel growth each time the form is run.

styleClass = DEFAULT
stylename = DEFAULT

Button code is only:
forms.frm_event.controller.show()

any ideas appreciated
Mark
Mark Crichton
DataWise Ltd - New Zealand
http://www.datawise.co.nz
User avatar
Mark Crichton
 
Posts: 109
Joined: Mon Jan 24, 2011 10:01 am
Location: Auckland, New Zealand

Re: Navigator form width problem

Postby Andrei Costescu » Thu Mar 22, 2012 1:44 pm

Is this smart client or web client? Which Servoy version?
Let me see if I got this right: your control form is shown by itself in the application's window. Then you click a button, go to one of the subforms being shown instead in the same window.
Then you go back to the control form, click on another button => another subform is shown (alone) in the same window, but with wrong navigator size.

So no tab-panels, JSWindow use, split-panels or other such things.
Do you use solution model to change solution contents at runtime?
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: Navigator form width problem

Postby Mark Crichton » Sat Mar 24, 2012 11:15 am

Hi Andrei

Thanks for your response. Here's the info you requested. Servoy 6.0.5 and problem is in Smart client.

The solution was based on the Servoy crm sample app as the basis, so works just like it does except has a control form.

It very much as you described, and test th control form has 4 tab panels, but none use a navigator left side.
The 4 Navigator forms have buttons to switch between them, and these work perfectly. It is going back to the control panel ( no navigator) and then back to sub form that causes the problem.

The navigator has two sub forms, above and below, the subforms have multiple panels, split panels, and yes I do add and remove tabs on subforms at runtime. I have stripped it all back to basics and still get the problem.

It is rather complex to resolve, so am really looking for a way to programmatically reset the navigator to the required width at runtime to solve the problem.
Regards
Mark
Mark Crichton
DataWise Ltd - New Zealand
http://www.datawise.co.nz
User avatar
Mark Crichton
 
Posts: 109
Joined: Mon Jan 24, 2011 10:01 am
Location: Auckland, New Zealand

Re: Navigator form width problem

Postby Andrei Costescu » Mon Mar 26, 2012 10:12 am

Is the navigator form added via the the "navigator" form property of the containing forms or just implemented through a split-panel?

If you are using "navigator" property, you could try (when you are in your controller form and you click a button to go to a form containing the navigator) to set the width of the navigator form using SolutionModel. But even if that works I think we should try to find the real cause of this 4px displacement.

Code: Select all
if (history.removeForm("navForm"))
{
   solutionModel.removeForm("navForm");
   var navForm = solutionModel.getForm("navForm");
   if (navForm)
   {
      navForm.width = 180;
   }
}
Anyway, I doubt this would have any effect unless you already change that width in other places.
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: Navigator form width problem

Postby Mark Crichton » Mon Mar 26, 2012 8:46 pm

HI Andrei

Yes the navigator is attached via the "navigator" property.
I tried your code substituting my forms name "frm_nav_main" with no effect.
Also tried just removing it, and that never happened either.
Maybe as it's an instance of the form attached to "frm_event", so needs to be called via it somehow?

Appreciate the help.Thanks
Mark
Mark Crichton
DataWise Ltd - New Zealand
http://www.datawise.co.nz
User avatar
Mark Crichton
 
Posts: 109
Joined: Mon Jan 24, 2011 10:01 am
Location: Auckland, New Zealand

Re: Navigator form width problem

Postby Andrei Costescu » Thu Mar 29, 2012 1:58 pm

You said you stripped it back to basics and you still see the problem.
In this case I guess the best way to go is to create a bug report and attach to it the smallest sample solution you can come up with that shows this.
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: Navigator form width problem

Postby Mark Crichton » Sat Mar 31, 2012 11:25 am

Thanks Andrei

I will do that.
Mark Crichton
DataWise Ltd - New Zealand
http://www.datawise.co.nz
User avatar
Mark Crichton
 
Posts: 109
Joined: Mon Jan 24, 2011 10:01 am
Location: Auckland, New Zealand


Return to Forms

Who is online

Users browsing this forum: No registered users and 14 guests