Use a form as both a tabpage and modal form?

Author: christoffer.aronsson@ladok.umu.se (voltagecontrol)

Hi,

We're building a form that will contain a tabform with several tabpages. However, one of these tabpages also need to exist as a standalone form. This would all work very well if we could find a way to change the Window Type between Form and TabPage on the fly via proc-code.

Has anyone tried something like this before - is it possible to do? Or do you have any other clever suggestions?

 

Best regards

Christoffer, Sweden

13 Comments

  1. We developed two nice solution in that area. 1) Modal tab's. 2) Modal Harmonica. In both situations we make use UNIFACE power to recalculate the y-ax of each field. Be aware that labels can't be dynamical positioned. In the solution developed, we replaced every label with a hyperlink (including some change in the ini setting introducing a logical widget for it). One disadvantage of the hyperlink a % sign is not supported (right/left/center alignment is supported). The developed implementation wizard helps you to re-develop your modal forms into modal tab, or modal harmonica forms. More: Please mail me at info@tcco.nl or call +31 618 975 207


    Author: tcco (info@tcco.nl)
  2. ulrich-merkel said Hi Christoffer, what about a "pseudo-modal" (no way to leave this component, because all the "leave xxx" triggers return -1) tabcarrier with just a tabwidget (and only your single tabpage) ? Success, Uli P.S. I do not think tabpages can be changed so easily to a modal page that this can be done via proc.  

    We implemented successful a nice modal tab and beautiful modal harmonica solution.  Use the dynamical y-as field positioning in UNIFACE. Want to know more...mail info@tcco.nl


    Author: tcco (info@tcco.nl)
  3. FiresongKt said The issue has been dealt with in version 9.6 with the container widget. 

    As I understand it, this allows you to put a 'tab page' form in another form inside a widget. 

    If that widget is the only one on the outer form, and is attached top bottom left and right, then the tab form is the only thing one can see. 

    I'm not sure about modal, however, as we can't yet move to 9.6 for me to try this stuff (too many users on pesky XP boxen and 2003 servers.)

     

          That's all true     One have to create a simple form OUTER with one field of type "tab". Attach this field to all borders (resp. splitbars).     Declare the form INNER (wich to include) as "contained" and be sure to remove all border settings.     On start of the outer form OUTER you create an instance of INNER and assign this to $valrep of the field.     What you get is an "object" that looks like a "normal" modal variant of your non-mdal form INNER     BUT ...     But there is a drawback with this construct: It is not a modal one.     So one have to implement a few things into the FRGF/FRLF of the involved components.     And this is a little bit tricky, especial if you plan to implemenat this approch in a generic manner     I fight this battle with the logic of UnifAce for a few "days" and didn't found (until now) the perfect solution     Ingo    


    Author: istiller (i2stiller@gmx.de)
  4. I will admit that I didn't think it ran on XP at all, and we are migrating our customers (because we can't stay current with patches otherwise), but the main issue is probably that it's not supported on Server 2003. 


    Author: Iain Sharp (i.sharp@pcisystems.co.uk)
  5. Hi, just a sideline to this topic: FiresongKt, isn't Uniface 9.6 running on XP as long as you hold on to 9.6.04 or earlier? The support on XP will probably stop in May for all Uniface versions, or have I understood this wrong? Or do you think that Uniface 9.6 requires more from the PC than other versions of Uniface? Regards RogerW.


    Author: rogerw (roger.wallin@abilita.fi)
  6. The issue has been dealt with in version 9.6 with the container widget.  As I understand it, this allows you to put a 'tab page' form in another form inside a widget.  If that widget is the only one on the outer form, and is attached top bottom left and right, then the tab form is the only thing one can see.  I'm not sure about modal, however, as we can't yet move to 9.6 for me to try this stuff (too many users on pesky XP boxen and 2003 servers.)


    Author: Iain Sharp (i.sharp@pcisystems.co.uk)
  7. I am attracted by the title of this thread on the form control. This is also a topic which I am eager for a good answer. Hope I can find a good form control guide.  


    Author: xiaoyuandlg (xiaoyuandlg@hotmail.com)
  8. Hi Christoffer,

    what about a

    "pseudo-modal" (no way to leave this component, because all the "leave xxx" triggers return -1)

    tabcarrier with just a tabwidget (and only your single tabpage) ?

    Success, Uli

    P.S. I do not think tabpages can be changed so easily to a modal page that this can be done via proc.

     


    Author: ulrich-merkel (ulrichmerkel@web.de)
  9. Hi Uli,

    Ah, yes, that was my initial thought as well. Too bad it looks a bit out of place. If one could somehow hide the tab-bar, then that would be a quite allright solution. Problem is that we don't want to have to maintain two exact copies of the same form - that's just an accident waiting to happen.

    Perhaps one could do some sort of massive complete-form-dummy-entity that's inherited via the model in both the tabpage and the form?

     

    Best regards
    Christoffer, Sweden


    Author: voltagecontrol (christoffer.aronsson@ladok.umu.se)
  10. Hi Christoffer,

    I just placed a wish to have beside the "tab widget" a
    tabpage-container whthout a tab-bar which hosts only 1 tabpage.

    Gives you all kind of possibilities to compose a presentation page.

    Success, Uli


    Author: ulrich-merkel (ulrichmerkel@web.de)
  11. A workaround can be to just draw something to hide the tab header you don't want to see.

    First paint your tab widget somewhere in your form. Adjust its properties to have it attached to window borders (at least top, left).

    Now paint a new widget, say a noeditbox, in the very top left corner of your form. Make it big enough to completely hide the tab header and not too big so as not to hide the tab content (2 units height is good).

    Again, adjust its properties to have it attached to top, left and right window borders.

    You're done. Your noeditbox appears on top of the single "offending" tab header.

    See [[Media:2249021 thumb]]


    Author: cwfr-lizac (laurent.izac@compuware.com)
  12. Hi Laurent,

    hiding the tab-row is for sure a temporary fix, but it costs an additional line.

    I think it is a pragmatic way to do the job as long as we do not have the tabpage container.

    Success, Uli

     

     


    Author: ulrich-merkel (ulrichmerkel@web.de)
  13. I think I am going to try this next time. Maybe even without hiding the tab, until the Lab has found a solution for that. It saves a lot on maintenance if you can re-use for example client information on many screens of yout system.


    Author: Theo Neeskens (tneeskens@itblockz.nl)