Alpha Video Training
Results 1 to 10 of 10

Thread: 'Standard' form as MDI?

  1. #1
    Member SwissCharles's Avatar
    Real Name
    Charles U. Schneiter
    Join Date
    Apr 2003
    Location
    Basel, Switzerland
    Posts
    181

    Question 'Standard' form as MDI?

    Hi folks,

    Having delved into the MDI-examples in the 'learning xDialog tutorial', I have now adapted a dockable panel to host a toolbar menu (xDialog) which looks and works nicely.

    BUT: when opening a standard desktop form from this docking panel, the form does not open next to the docking panel, but next to the left screen edge underneath the docking panel. :(

    From the example using customer's data to display in an mdi child window, I now gather that Selwyn does not use standard forms but xDialogs which are 'bound' to the table's data via code. Besides to have to set up this you also have to set up each and every label, buttons et al.

    This does not in any way pass criticism on xDialog or xBasic which I both use quite often (they are tremendously capable tools when it comes to fine tuning of built in functionality) and learning them can be of great benefit. But to have to code each and every form as an xDialog just to get a nicely aligning MDI layout seems a bit tedious to me.

    Do I miss something here or is it indeed so that you can not use standard forms as MDI child windows (which would surprise me a bit)? Or is there an easier work around to get an MDI setup with forms?

    Many thanks for your thoughts!
    SwissCharles
    Between the Alps and a comfy place

  2. #2
    Member SwissCharles's Avatar
    Real Name
    Charles U. Schneiter
    Join Date
    Apr 2003
    Location
    Basel, Switzerland
    Posts
    181

    Default Re: 'Standard' form as MDI child?

    Any takers?

    Is there really no possibility to open a 'standard' form as an mdi child form from a user defined dock panel?

    What I would like to do is to use dock panels as an apps main menue, where I can put menu choices into a dock panel and open forms in the child area. See attached image.

    Do I miss something here, or is it really not possible to attain this functionality? How are you guys and gals doing this??

    Thanks for your thoughts!
    SwissCharles
    Between the Alps and a comfy place

  3. #3
    Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,629

    Default Re: 'Standard' form as MDI child?

    If you want to position your forms exactly, here is how I do it:

    vWindowTitle = :A5.window_title

    SYS_ID_RESTORE(vWindowTitle)
    SYS_ID_MOVE(vWindowTitle,4,4)
    SYS_ID_RESIZE(vWindowTitle,4,5)

  4. #4
    Member
    Real Name
    Robert W. McGaffic
    Join Date
    Mar 2007
    Posts
    577

    Default Re: 'Standard' form as MDI?

    Peter,

    Thank you for your guidance on exactly positioning a standard Alpha Five form.

    I, like Charles, was somewhat incredulous that Selwyn's example used a dockable panel with forms that were completely defined using XDialog. As I noted earlier, this strikes me as infinitely more work that the drag and drop controls possible with standard A5 forms. Looks like Charles has come to a similar conclusion.

    But as a followup question: How do you change the location of the A5 standard form if the user widens the width of the dockable panel?

    Any serious application must be able to do this. Selwyn's XDialog example allows the dockable panel to be widened, and the "main" form simply is repositioned to the left side of the dockable panel. The "main" form is dynamically repositioned, and the dockable panel does not overwrite the "main form".

    How do you accomplish the same result with a desktop form? Do you somehow assess the width of the dockable panel then set the left coordinates of the desktop form to this value. Or is there a better way to do this.

    Thanks,
    Bob McGaffic
    Pittsburgh, PA

    PS: This desired behavior emulates what a commercially available splitter control does. I've done this so simply on an Microsoft Access form by placing a splitter bar between two areas of the screen, and when the form is executed, dragging the splitter bar can enlarge the left area of the screen and reduce the right area of the screen. Unfortunately, I have been unable to find even one ActiveX splitter control that works with Alpha Five.

  5. #5
    Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,629

    Default Re: 'Standard' form as MDI?

    Quote Originally Posted by rmcgaffic View Post
    How do you accomplish the same result with a desktop form? Do you somehow assess the width of the dockable panel then set the left coordinates of the desktop form to this value. Or is there a better way to do this.
    Hi Bob,

    I seem to remember there is an example in the xdialog samples that come w. A5 showing you how to get the xdialog coordinates. Then as you say, you would have to dynamically apply the difference.

  6. #6
    Member SwissCharles's Avatar
    Real Name
    Charles U. Schneiter
    Join Date
    Apr 2003
    Location
    Basel, Switzerland
    Posts
    181

    Default Re: 'Standard' form as MDI?

    Peter, Bob, Thanks for your input!

    This sure sounds like an awful lot of trouble getting this to work.

    On top of it - if I am not getting this wrong:
    Forms launched from a dock panel will always open in a new window and not be part of a context set in the xDialog.

    Idea: Defining a form as a dialog sans system buttons and window title bar, one could probably kind of "mimick" an mdi interface?

    Thanks for any further input on this!
    SwissCharles
    Between the Alps and a comfy place

  7. #7
    Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,629

    Default Re: 'Standard' form as MDI?

    Quote Originally Posted by SwissCharles View Post
    Idea: Defining a form as a dialog sans system buttons and window title bar, one could probably kind of "mimick" an mdi interface?
    Attached is an image of a floating dialog - minus the A5 shell. It's doable but building an entire app around it would be tricky since all your forms will need to be dialogs, each free floating as it were. You could hide or close dialogs so only one shows at a time, of course. Doable, but tricky.

  8. #8
    Member
    Real Name
    Robert W. McGaffic
    Join Date
    Mar 2007
    Posts
    577

    Default Re: 'Standard' form as MDI?

    Charles,

    Sadly, I think you are right.

    Which brings us somewhat full circle to well using Alpha Five desktop forms with a menu structure.

    After devoting way more time than I would like to admit playing around with this, I think the best desktop form developers can accomplish is to place the menu on a separate form and from there launch individual forms selected from that menu. Clicking on a menu selection results in the menu form being hidden and the selected form displayed. The tabs for both a clearly visible in the tabs at the bottom of the screen and the user and quickly switch back to the menu to open another form if desired.

    Selwyn has shown that if you are sufficiently hard-core, you can hard code all your forms and use a dockable panel as you wish. This may be a fine approach for developing a tool like Alpha Five, but it very much belies the "easy-to-use" mantra of Alpha of yester year.

    Jeff Kletrovets posted an alternative on the board with the last several weeks. He created a XDialog menu and then embedded it on each and every form in his application, taking care to position its X,Y coordinates and size the same on each form.
    While this works, in my mind it presents all kinds of long range maintenance issues.

    Another approach would be to create a desktop menu form where the menu tree is on the left side of the form, and then a subform is placed to its right. Microsoft Access makes this very easy to do, but unfortunately Alpha Five can handle this easily without creating all kinds of "dummy" sets. Again, not very elegant.

    Bob McGaffic
    Pittsburgh, PA

  9. #9
    Member SwissCharles's Avatar
    Real Name
    Charles U. Schneiter
    Join Date
    Apr 2003
    Location
    Basel, Switzerland
    Posts
    181

    Default Re: 'Standard' form as MDI?

    Peter, Bob, Thanks again for your thoughts!

    For now, I think it's best to follow Bob's recommendation by
    "...placing the menu on a separate form and from there launch individual forms selected from that menu..."
    It's a pity, as such a dockable panel - combined with regular forms - would be waayyy cool :cool:

    Not holding my breath, I will make a suggestion over at the feature request forum. One never knows :)
    SwissCharles
    Between the Alps and a comfy place

  10. #10
    "Certified" Alphaholic MoGrace's Avatar
    Real Name
    Robin
    Join Date
    Mar 2006
    Location
    Los Angeles
    Posts
    3,595

    Default Re: 'Standard' form as MDI?

    Still trying to get a conversation going here on dock panels. I found the Toolbox style XD which looks as close to getting the genie to set up a dock panel as I have found. And Selwyn mentioned that a dock panel can be used like a modeless XD toolbar, so converting it and docking it on the left should work the same as it does with the Toolbox to make a menu with animation.

    Surely somebody by now has a simple working example they would like to share...?

    Pretty please!
    Robin

    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

Similar Threads

  1. platinum with standard
    By John Lemisch in forum Alpha Five Version 9 - Desktop Applications
    Replies: 5
    Last Post: 07-28-2008, 03:18 PM
  2. Standard to Platinum
    By Steve Workings in forum Alpha Five Version 9 - Desktop Applications
    Replies: 1
    Last Post: 06-23-2008, 10:00 PM
  3. mdi xdialog with html form bug?
    By Lance Gurd in forum Alpha Five Version 9 - Desktop Applications
    Replies: 4
    Last Post: 06-10-2008, 09:22 AM
  4. Common Terminology Terms - SDI vs MDI
    By Ray Fernandez in forum Alpha Five Version 5
    Replies: 2
    Last Post: 08-07-2002, 03:15 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •