ActivePage
ActivePage
Hi Andreas,
I require Next and Previous buttons in my GUI, and also I need to reset the ActivePage back to 0 when a window is re-opened as MUI remembers which Page was last left open.
Please can you give a simple example of how to use Group.ActivePage as I have been unsuccessful, e.g. two buttons with Previous and Next.
I require Next and Previous buttons in my GUI, and also I need to reset the ActivePage back to 0 when a window is re-opened as MUI remembers which Page was last left open.
Please can you give a simple example of how to use Group.ActivePage as I have been unsuccessful, e.g. two buttons with Previous and Next.
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
http://myevolve.wordpress.com
- airsoftsoftwair
- Posts: 5433
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: ActivePage
Hmm, simply doing a
doesn't work?
Code: Select all
mui.Set("pagegroup", "activepage", <index of page>)
Re: ActivePage
I don't think I have the correct XML implementation of this at all.. I don't have a pagegroup as such I just based my code around Pages.xml in the examples folder.
Let me paste some code in...
XML Structure:
Hollywood:
Let me paste some code in...
XML Structure:
Code: Select all
....
<window title="AmigaOS Appstore - Sign up for an account with Jack" muiid="APSU" id="APSU" notify="closerequest" sizegadget="false" open="false">
<vgroup spacing="20">
<register>
<vgroup id="signup-page1" title="Quick Questionnaire">
....
<hgroup>
<button id="signup-cancel" hichar="c" controlchar="c" notify="pressed">\33A[78] Cancel</button>
<button id="signup-next" hichar="n" controlchar="n" notify="pressed">\33A[162] Next Page</button>
</hgroup>
....
</vgroup>
<vgroup title="Create an Account">
....
<hgroup>
<button id="signup-cancel2" hichar="c" controlchar="c" notify="pressed">\33A[78] Cancel</button>
<button id="signup-previous" hichar="p" controlchar="p" notify="pressed">\33A[159] Previous Page</button>
<button id="signup-doit" hichar="s" controlchar="s" notify="pressed">\33A[421] Sign Up</button>
</hgroup>
....
</vgroup>
</register>
</vgroup>
</window>
....
Code: Select all
Case "signup-cancel" ;; APP STORE SIGN UP WINDOW
mui.Set("APLG","sleep",false)
mui.Set("APSU","open",False)
Case "signup-cancel2"
mui.Set("APLG","sleep",false)
mui.Set("APSU","open",False)
Case "signup-next"
mui.Set("signup-page1","activepage",1)
Case "signup-doit"
....
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
http://myevolve.wordpress.com
- airsoftsoftwair
- Posts: 5433
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: ActivePage
You need to set the "ActivePage" attribute on the <register> object, not on the <vgroup> object.
Re: ActivePage
Excellent, thanking you.
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
http://myevolve.wordpress.com
Re: ActivePage
Requesting the active page with mui.get("register","ActivePage") gives back a string for the first page ("First") and a number for the rest.
It would be easier to handle if the result could only be one type.
I have to check the type before using it in an expression.
Would it be change in the future?
It would be easier to handle if the result could only be one type.
I have to check the type before using it in an expression.
Would it be change in the future?
Re: ActivePage
You don't need to get the active page first, just set the ActivePage to MUIV_Group_ActivePage_Next/Prev/First.
Re: ActivePage
Sorry I don't know what is MUIV_Group_ActivePage_Next/Prev/First.
The problem is that the following is not working because the switch can't be numeric and string in the same time:
However found a simple solution:
The problem is that the following is not working because the switch can't be numeric and string in the same time:
Code: Select all
Switch mui.get("register","ActivePage")
Case "First":
DebugPrint("first")
Case 1:
Debugprint("second")
Case 2:
DebugPrint("third")
EndSwitch
Code: Select all
Switch Val(mui.get("register","ActivePage"))
Case 0:
DebugPrint("first")
Case 1:
Debugprint("second")
Case 2:
DebugPrint("third")
EndSwitch
Re: ActivePage
If you use the special values, you don't need to get the active page first!
The special values are named differently in MUI-Royale, use just "First", "Next", "Prev", etc, see http://www.hollywood-mal.com/docs/html/ ... ePage.html
You simply use it like this:
mui.Set("register", "activepage", "Next")
The special values are named differently in MUI-Royale, use just "First", "Next", "Prev", etc, see http://www.hollywood-mal.com/docs/html/ ... ePage.html
You simply use it like this:
mui.Set("register", "activepage", "Next")
Re: ActivePage
Thanks for your answer, but as you can see in my previous post I am using mui.get, not mui.set. I wanted to read which register panel the user selected last time.You simply use it like this:
mui.Set("register", "activepage", "Next")