Using 2 subforms Horizontally

sunnyksunnyk Member Posts: 280
Hi,
I have created a form in which is based on Item table. For this i have used a card form to give Filters Like Gen Prod. posting Group etc. Down below I used a tabular form to list all the filtered Items. Below this tabular form i have to use two subforms which are based on Bin content table and a customized manufacturer table. the link is Item no in both the cases. I have tried all the possible hit and trial for Horglue and verGlue and other properties but their appearance is not very good. sometime one form got over another etc...

Is there any way to use 2 subforms and show them in an elegant way to the main form.

Comments

  • krikikriki Member, Moderator Posts: 9,110
    Can you make a screenshot of what you have? I have some difficulties to understand what you have done.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • SogSog Member Posts: 1,023
    Probably your initial design:
    --------------------------------
    |                               |
    |        Item                   |
    |                               |
    -------------------------------
    |         |                    |                     
    |  Sub1   |     Sub2           |
    --------------------------------
    
    More elegant design
    --------------------------------
    |                             |
    |        Item                 |
    |                             |
    --------------------------------
    |                Sub1         |                     
    --------------------------------
    |                Sub2         |
    --------------------------------
    
    OR
    
    --------------------------------
    |                |             |
    |        Item    |    Sub1     |
    |                |             |
    --------------------------------
    |                  Sub2       |                     
    |                             |
    --------------------------------
    
    

    Damn this wysiwyg editor is not valid for code!
    |Pressing F1 is so much faster than opening your browser|
    |To-Increase|
  • jspoppjspopp Member Posts: 54
    Hi, I think Sog's second suggestion (the stacked one) will work best. We have a form like that. I checked the properties on our sub forms and both have the default HorzGlue and VertGlue settings. When the form is max size, it works nice. If you shrink the form, part of the subform becomes hidden. If you have buttons at the bottom, make sure they are each set to Right and Bottom for the glue settings. Give that a shot and good luck!
  • David_SingletonDavid_Singleton Member Posts: 5,479
    Sog wrote:
    Probably your initial design:
    --------------------------------
    |                               |
    |        Item                   |
    |                               |
    -------------------------------
    |         |                    |                     
    |  Sub1   |     Sub2           |
    --------------------------------
    

    I have used this layout before, but it requires that one of the sub forms (preferably the left) is fixed width (glue left) and the other is floating (glue horiz both). I have also done it with buttons that allow you to make the fixed sub form wider. The list box needs to be glued top and the two subforms glued vertical both.
    David Singleton
  • thegunzothegunzo Member Posts: 274
    There is always the possibility to activate the Timer on the main form and check if the form size has changed from the last time the Timer Trigger fired. If it has changed it is possible to change the size and position of the subforms to divide the available space between the two.

    For example I use the following code for two subforms side by side.

    IF CurrForm.WIDTH <> MasterWidth THEN BEGIN
    MasterWidth := CurrForm.WIDTH;
    CurrForm.AccFrame.WIDTH := ROUND((SubformRatio * MasterWidth / 100) - 550,1);
    CurrForm.BankFrame.WIDTH := ROUND(((100 - SubformRatio) * MasterWidth / 100) - 550,1);
    CurrForm.BankFrame.XPOS := 110 + ROUND((SubformRatio * MasterWidth / 100),1);
    END;
    ________________________________
    Gunnar Gestsson
    Microsoft Certified IT Professional
    Dynamics NAV MVP
    http://www.dynamics.is
    http://Objects4NAV.com
Sign In or Register to comment.