Menu

Create Gui dynamically to runtime

2006-04-12
2013-04-11
  • Nobody/Anonymous

    Hello,

    First: I would prefer conversation in german, if possible (as the product seems to be german). ^^

    My Question:

    I have the following idea of a Layout: (I try to describe it as a BorderLayout)
    NORTH: My navigation panel containing several Components, for example Button, Radio Buttons or ListBox (for navigation)
    CENTER: Depending on the selection made in the ListBox or the RadioButton in my navigation Panel in this CENTER-Panel (let's call it ContentPanel) different ContentPanels will be displayed.

    This would act like a Website, having a navigation-frame and a content-frame. The Content-Panels should switch by navigating with the navigation-Panel.

    Let's say there is a Content-Pane having a Text Field and another Content-Panel (also defined in the xml_gui) one with a table or a List.

    On the load of the ContentPane textfield should load it's content (maybe some news) from an "external" source.

    Can you give me a hint how to solfe something like that?

    Best regards,
    Bastian

     
    • dvdw

      dvdw - 2006-04-13

      Klar Deutsch geht auch.

      Das Befüllen eines textfeldes (label) wird mit pcmf_setValue() gemacht.

      Der XML code für das Basis Layout sieht wie folgt aus:

      <?xml version="1.0" encoding="ISO-8859-1"?>
      <application port="8080" name="WiSer-TestPlace/start" mdi="true" submit="true" genReshapeEvents="false" register="" extCss="">
        <page name="MyNewPage" active="true" orphan="false" layout="true" ownMenu="true" genReshapeEvents="false" submit="true" register="" scroll="false">
          <position x="0" y="0" height="480" width="640">
          </position>
          <color fg="black" bg="white">
          </color>
          <default value="">
          </default>
          <commonLayout value="GRIDBAG">
          </commonLayout>
          <form name="navigation" orphan="false" layout="true" register="" scroll="false" lazy="false">
            <position x="0" y="0">
            </position>
            <color bg="blue">
            </color>
            <weights weightX="100" weightY="20">
            </weights>
            <insets top="0" left="0" bottom="0" right="0">
            </insets>
          </form>
          <form name="MyNewForm" orphan="false" layout="true" register="" scroll="false" lazy="false">
            <position x="0" y="1">
            </position>
            <color bg="green">
            </color>
            <weights weightX="100" weightY="80">
            </weights>
            <insets top="0" left="0" bottom="0" right="0">
            </insets>
            <commonLayout value="GRIDBAG">
            </commonLayout>
            <textBox name="MyNewTextBox" value="dirk" rows="2" cols="80" valid="" submit="false" disable="false" orphan="false" register="">
              <position x="0" y="0">
              </position>
              <color fg="black" bg="white">
              </color>
              <readOnly value="true">
              </readOnly>
              <weights weightX="100" weightY="10">
              </weights>
              <fill hFill="true" vFill="true">
              </fill>
            </textBox>
            <form name="MyNewForm" orphan="false" layout="true" register="" scroll="false" lazy="false">
              <toolTip tip="">
              </toolTip>
              <position x="0" y="1">
              </position>
              <color bg="silver">
              </color>
              <weights weightX="100" weightY="90">
              </weights>
            </form>
          </form>
        </page>
      </application>

       
    • Nobody/Anonymous

      Hallo,
      Die Frage wurde glaube ich missverstanden ;-)

      Ich habe meine Navigation jetzt teilweise realisiert und zwar auf folgende Art udn Weise:

      Ich habe in meiner Application eine Page eingefügt.
      IDese page enthält drei Forms.
      Ein Form ist mein NavigationsFrame. Er enthält eine ComboBox.
      Diese hat zwei Items: Panel 1, Panel 2.
      Wählt der Anwender nun Panel 2, bestimme ich über den Listener, dass Panel 2 gezeigt wird und Panel versteckt wird und umgekehrt.

      Wie stelle ich es aber an, dass zum Programmstart KEIN Panel (Also weder Panel 1 noch Panel 2) angezeigt werden.

      Gruß,
      Bastian

       
    • dvdw

      dvdw - 2006-04-18

      Hallo Bastian,

      Wenn der Bereich unterhalb bzw. neben Navigation frei bleiben soll, würde ich ein dritts Panel (leer) nehmen.

      Falls ich immer noch nicht richtig liege, schick mir doch mal per Mail einen Screenshot wie es aussehen soll.

      Grüße
      Dirk

       
    • Nobody/Anonymous

      Hallo,

      So habe ich es jetzt schlussendlich auch testweise gelöst. Ein leeres Panel / Form überdeckt beim starten der Anwendung alle anderen Komponenten, die nicht sichtbar sein sollen.
      Habe auf dem Panel einen "Enter" button eingefügt, bei dessen drücken eine Action ausgelöst wird, die alle Komponenten versteckt.

      Alternativ wäre auch möglich, dass meine navigatinoselemente dieses Panel verstecken. Das wäre aber auch nicht wirklich elegant, da hierdurch das das whitePanel.hide() bei jeder Actio naufgerufen würde, was nicht notwendig ist, nachdem das whitePanel einmal versteckt wurde.

      Anhand des Hangman-Beispiels kann man sich auch viele Ideen holen.
      Schade, dass die darin verwendeten Komponenten und Vorgehensweisen niergendwo dokumentiert sind.
      Das hätte das erlernen des Umgangs mit dem Framework deutlich erleichtert.

      Gruß, bastian

       
    • Nobody/Anonymous

      It would help others like me, if you could translate this into English too.

       
    • Nobody/Anonymous

      Even though I can read both German and English, I'd also suggest to keep conversations in English if they are intended to promote a product, because it does appear to be the current standard language on the net. Until we all have to learn Mandarin, I guess ;-)

       
    • Nobody/Anonymous

      You are right. We will answer all further questions in English - and start learning Mandarin ;-)

      Dirk

       

Log in to post a comment.