![]() |
opening pages in a window
I have a ? for the guru's here:
I want to use a button that I can click to open a new page that can be displayed within a current window. Namely, the inventory window. Once the window displays, I would like to have the window use a close button to hide that window so the inventory window is back to normal. I tried using onpress and onactivate, but I am not seeing my page open. I started my new page with visible = false. Using a button and the onpress property, I told it "newpage.visible = true paperdoll.visible = false" it is not working. I click my button and do not see my new page. Any help please is welcomed. -dn |
Based on "newpage.visible = true paperdoll.visible = false" and assuming your button and newpage are within the EquipmentPage object my guess is you need to use this code:
Code:
Parent.newpage.Visible=true Parent.PaperDoll.Visible=falseIf you still have trouble, post your XML file. Quib |
On my newpage do I set that to visible = false within its own properties ?
Or leave as visible and in the Inventory property use Onshow = Parent.Newpage.Visible=false here is my XML tree: Using UIBuilder btw - -Inventory ...-Inventory ......-Newpage ......-Coinpage ......-etc the rest of the normal pages. Newpage is what I want hidden when Inventory is opened. Newpage is to be shown over top the paperdoll when the button I have is pressed. Then, Newpage is to be closed via a button on its page to allow paperdoll to be seen again and newpage to close. |
Those two things would accomplish the same thing, so it doesn't REALLY matter which way you do it. I'd recommend setting Visible=false in the newpage object. It's more efficient to directly set the variable than to use OnEvents wherever possible.
Quib |
I need to know where in the tree your button is as that has a direct impact on the code in the OnEvent.
Quib |
Button to open Newpage is located in:
-Inventory ...-Inventory ...-button for new page basically it is located on same branch as the close, option and help button. |
K, set newpage's Visible property to false.
Try the following code on the button: Code:
Parent.EquipmentPage.PaperDoll.Visible=false Parent.newpage.Visible=true |
hehe thanks Quib you are a BIG help!!
Now, I got the Newpage to open. Not too concerned for the moment on the paperdol atm. Now that I can open the Newpage but I can't get the Newpage to close. The button to close the Newpage is on the Newpage itself. Using the default close button. I have onpress Parent.Newpage.Visible=False. It won't close. So please if you can help me with this, then I will on the paperdoll hiding. Thanks Quib!! |
lil more info for you Quib, paperdoll should not be of concern now to me. I think I don't need to worry about hiding it. Just need the close button on Newpage to close that page. Thanks!
|
The button on newpage needs the following OnPress:
Code:
Parent.Visible=falseQuib |
OK thank you!! I am setting it up now to see if works! Thanks Quib!!
|
Ok got the button to work! It closes Newpage. BUT, now paperdoll no longer comes back.
here is the Close button's Onpress from Newpage: Parent.Visible=False EquipmentPage.PaperDoll.Visible=True |
Got it to wrok woo hoo Ty Quib for your help.
I am finishing my mod then I will post my newest mod for the Inventory window! :nana: -dn |
| All times are GMT -5. The time now is 06:40 PM. |
vBulletin® - Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
© MMOUI