 |

04-05-2005, 03:18 PM
|
 |
A Griffon
|
|
Join Date: Mar 2005
Server: Unkown
Posts: 588
|
|
vertical/horizontal expand toggle
Yeah, this one is gonna be a doozy. I have a vertical group window that I made which expands/contracts automatically everytime a new GroupMemberPage shows/hides. That was the eay part.
The necessary events for GroupMember2 are:[indent]OnHide="parent.size=280,45" OnShow="parent.size=280,90"
Now say I wanted to change it to a horizontal-expanding group window at the touch of a button.
So my button would say this, I think:
[/INDENTOnPress="parent.groupmember2.onhide="parent.size=240,45" "parent.groupmember2.onshow=490,45" "{{repeats for every groupmember}} onpress=press2"
Something like that? I just wanna make sure before i write like miles of code and have it not work.
EDIT: and then, after I do all of that, I would need some code to change the location of GroupMember2 from being under Groupmember1 to the right of Groupmember1. Would that be part of PackLoc or ... *??*
EDIT2: I just noticed this thing is in UI Developer. I meant to put in under XML Help, musta clicked the wrong forum. If ya'll think its more on topic there, there go ahead an move it ;-) thanks
Darrin
Last edited by dc_roenfanz : 04-05-2005 at 03:27 PM.
|

04-05-2005, 03:56 PM
|
 |
A Green Troll
|
|
Join Date: Dec 2004
Server: Blackburrow
Posts: 2,221
|
|
So my suggested method for dealing with this sortta thing is to give each MemberPage a dummy OnShow for each configuration.
OnShowV="all the resize and location stuff you want to happen to this MemberPage when layout is set to vertical"
OnShowH="all the resize and location stuff you want to happen to this MemberPage when layout is set to horizontal"
Now all your ConfigH button has to do is set MemberPage#.OnShow=MemberPage#.OnShowH for each member.
Do the same type thing for OnHides.
Maybe toss in...
MemberPage.Visible=! MemberPage.Visible=!
to double toggle visibility of each member and force the window to reconfig while grouped.
|

04-05-2005, 04:19 PM
|
 |
A Griffon
|
|
Join Date: Mar 2005
Server: Unkown
Posts: 588
|
|
Quote:
|
Originally Posted by Zonx
So my suggested method for dealing with this sortta thing is to give each MemberPage a dummy OnShow for each configuration.
OnShowV="all the resize and location stuff you want to happen to this MemberPage when layout is set to vertical"
OnShowH="all the resize and location stuff you want to happen to this MemberPage when layout is set to horizontal"
Now all your ConfigH button has to do is set MemberPage#.OnShow=MemberPage#.OnShowH for each member.
Do the same type thing for OnHides.
Maybe toss in...
MemberPage.Visible=! MemberPage.Visible=!
to double toggle visibility of each member and force the window to reconfig while grouped.
|
As an example then:
ToggleSizeButton.OnPress=parent.groupmember2.Onshow=groupmember2.OnShowH Onpress=Press2
ToggleSizeButton.Press1=parent.groupmember2.Onshow=groupmember2.OnShowH Onpress=Press2
ToggleSizeButton.Press2=parent.groupmember2.Onshow=groupmember2.OnShowV Onpress=Press1
-------------------------------------------
GroupMember2.OnShowV="parent.size=240,90" "shift postions code here"
GroupMember2.OnHideV="parent.size=240,45" "shift postions code here"
-----
GroupMember2.OnShowH="parent.size=480,45" "shift postions code here"
GroupMember2.OnHideH="parent.size=240,45" "shift postions code here"
-----------------
All I hafta do is figure out how to shift positions. Heh.
THanks, that helps alot.
Darrin
|

04-05-2005, 05:23 PM
|
 |
A Green Troll
|
|
Join Date: Dec 2004
Server: Blackburrow
Posts: 2,221
|
|
Yep. Might need some quotes in there, but that's the idea.
Add the following befor your OnPress=OnPress#
GroupMember#.Visible=! GroupMember#.Visible=!
Repeate it twice for each GroupMember
This flops the visibility of each group page twice. They'll end up with the same visability they started with, but what this does is trigger each page's OnShow and OnHide. Without this, your window wont get resized untill someone joins or leaves the group.
|

04-05-2005, 05:31 PM
|
 |
A Griffon
|
|
Join Date: Mar 2005
Server: Unkown
Posts: 588
|
|
Quote:
|
Originally Posted by Zonx
Yep. Might need some quotes in there, but that's the idea.
Add the following befor your OnPress=OnPress#
GroupMember#.Visible=! GroupMember#.Visible=!
Repeate it twice for each GroupMember
This flops the visibility of each group page twice. They'll end up with the same visability they started with, but what this does is trigger each page's OnShow and OnHide. Without this, your window wont get resized untill someone joins or leaves the group.
|
OK, Thanks a bunch.
*spends hours typing new code*
EDIT: For the actual window shift part, should I create like a dummy GroupMember page for the "true" pages to snap too? I think that would be easiest. Im gonna go study your inventory window. See if I can ge that to work.
EDIT2: LOL.... I created the dummy pages, THEN I found this wonderful nifty thing called "location". After looking at it some, I realized that the location of a window is dependant on its top left corner (unless you pack location to somewhere else???) Guess I answered my own question there.
Correct me if'n Im wrong though
EDIT3: Once I have every OnShowV (or H) value, do I need anything in the normal OnShow? or do I leave that blank?
D
Last edited by dc_roenfanz : 04-05-2005 at 05:55 PM.
|

04-05-2005, 08:11 PM
|
 |
A Griffon
|
|
Join Date: Mar 2005
Server: Unkown
Posts: 588
|
|
Drowning in text
Bah, I dunno, I think I broke it. I gotta go to school, so I'm just gonna paste the button code and hope someone helps me fix it. I had it *inside* the Group window frame, I dunno if that matters. I didnt type any *parents* would that be the problem? I am kinda stuck here?
Code:
<Button LocalTooltip="Click HERE to switch layouts!" Location="0,196" Name="ToggleDimensions" OnPress="groupmember2.onshow=onshowh groupmember3.onshow=onshowh groupmember4.onshow=onshowh groupmember5.onshow=onshowh groupmember2.onhide=onhideh groupmember3.onhide=onhideh groupmember4.onhide=onhideh groupmember5.onhide=onhideh groupmember2.visible=! groupmember2.visible=! groupmember3.visible=! groupmember3.visible=! groupmember4.visible=! groupmember4.visible=! groupmember5.visible=! groupmember5.visible=! onpress=press2" PackLocation="right,bottom" PackLocationProp="-280/0001,-014/0001" press1="groupmember2.onshow=onshowh groupmember3.onshow=onshowh groupmember4.onshow=onshowh groupmember5.onshow=onshowh groupmember2.onhide=onhideh groupmember3.onhide=onhideh groupmember4.onhide=onhideh groupmember5.onhide=onhideh groupmember2.visible=! groupmember2.visible=! groupmember3.visible=! groupmember3.visible=! groupmember4.visible=! groupmember4.visible=! groupmember5.visible=! groupmember5.visible=! onpress=press2" press2="groupmember2.onshow=onshowv groupmember3.onshow=onshowv groupmember4.onshow=onshowv groupmember5.onshow=onshowv groupmember2.onhide=onhidev groupmember3.onhide=onhidev groupmember4.onhide=onhidev groupmember5.onhide=onhidev groupmember2.visible=! groupmember2.visible=! groupmember3.visible=! groupmember3.visible=! groupmember4.visible=! groupmember4.visible=! groupmember5.visible=! groupmember5.visible=! onpress=press1 " ScrollExtent="15,15" Size="15,15" Style="/Ehlric.ButtonStyles.options_button" Tooltip="Click HERE to switch layouts!" UserMovable="true"></Button>
Or do you think that maybe my problems are with the group member pages???
Code:
<Page BackgroundColor="#00FF00" Location="3,44" Name="GroupMember2" OnHideH="parent.size=280,44 location=279,3 " OnHideV="parent.size=280,44 location=3,44" OnShow="onshowv" OnShowH="parent.size=555,44 location=279,3" OnShowV="parent.size=280,85 location=3,44" PackLocation="left,top" PackLocationProp="0003/0001,0044/0001" ScrollExtent="273,40" Size="273,40">
Last edited by dc_roenfanz : 04-05-2005 at 10:14 PM.
Reason: fixing code ( i think)
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 01:35 PM.
|
 |