Got an idea for enhancing SpiderBasic? New command(s) you'd like to see?
ljgww
 
Posts: 26
Joined: Thu Mar 26, 2020 5:47 pm

Render XML Dialog Structure into a ContainerGadget

by ljgww Thu Apr 09, 2020 2:15 pm

Add to wish list:

Having XML dialog structure to be a rendering within the container gadget (not a window) with the same behaviour as if it was a window.

Rationale:

This could simplify creation of application windows.

XMLdialog renders in predefined Window enclosure. There may be more than one dialog in the same XML each with its own window.

But it will be interesting to have something along this example :
(of course this code do not work :) )

Code: Select all
If OpenWindow( 0, 0, 0, 500, 500, "render in containers")
  container1 = ContainerGadget( #PB_Any, 0, 0, 250, 500)
  XML1$ =      "  <vbox>" +
              "    <hbox>" +
              "      <option name='visible' text='Visible' group='1'/>" +
              "      <option name='invisible' text='Invisible' group='1'/>" +
              "    </hbox>" +
              "    <text name='lbl1' text='Field Name'/>" +
              "    <string name='fieldName' width='50' height='30'/>" +
              "    <text name='lbl2' text='Field text'/>" +
              "    <string name='fieldValue' width='50' height='30'/>" +
              "    <hbox>" +
              "      <vbox>" +
              "        <text name='lbl3' text='Column'/>" +
              "        <string name='column' width='20' height='30'/>" +
              "      </vbox>" +
              "      <vbox>" +
              "        <text name='lbl4' text='Row'/>" +
              "        <string name='row' width='20' height='30'/>" +
              "      </vbox>" +
              "    </hbox>" +
              "    <hbox>" +
              "      <button name='ok' text='Save/Close' height='30' />" +
              "      <button name='cancel' text='Cancel/Close'/>" +
              "    </hbox>" +
              "  </vbox>"
  XMLrender(#render1id, XML1$, #enclosureXXX, container1)
  CloseGadgetList()

  container2 = ContainerGadget( #PB_Any, 250, 0, 500, 500)
  XML2$= ....
  XMLrender(#render2id, XML1$, "otherid",container2) ; otherid to be string or id 'number'
  CloseGadgetList()
  ...


perhaps similar to Dialog with a multiple sets of windows, can be under some other 'enclosure'

Code: Select all
<XMLchunks>
   <enclosure id=xxx name=xxx>
     <vbox>
         ....
     </vbox>
  </enclosure>
  <enclosure id=otherid name=other name>
  </enclosure>
</XMLchunks>


// Edit: Moved to "Feature Requests and Wishlists" (Peter)
User avatar
Peter
 
Posts: 749
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080

Re: Render XML Dialog Structure into a ContainerGadget

by Peter Thu Apr 09, 2020 4:46 pm

this can be done the following way:

// Edit: Code removed. See: Module: XmlGadget
ljgww
 
Posts: 26
Joined: Thu Mar 26, 2020 5:47 pm

Re: Render XML Dialog Structure into a ContainerGadget

by ljgww Fri Apr 10, 2020 12:46 pm

Peter wrote:this can be done the following way:

// Edit: Code removed. See: Module: XmlGadget


Awesome! Gorgeous!

This is exactly what I need. Many thanks!
Return to Feature Requests and Wishlists

Who is online

Users browsing this forum: No registered users and 4 guests