Select to view content in your preferred language

Changing default opening location of widgets

1416
8
06-28-2010 07:02 AM
TristanKnowlton
Frequent Contributor
I have changed the coordinates of where the widgets open in the maximized state in the sample flex viewer.  However, now when they open, the widget box is only about 50% visible.  See attached screen shot. 

I also need help changing the location of the minimized state of the widget.  When I change the coordinates for the minimized state, when clicking to minimize, the widget disappears altogether. 
What code specifically do I change to do this? 

Any help, as always, is greatly appreciated!
Tags (2)
0 Kudos
8 Replies
RobertScheitlin__GISP
MVP Emeritus
Darryl,

   Where are you making your code changes and what exactly do you mean by
change the coordinates of where the widgets open
?
0 Kudos
TristanKnowlton
Frequent Contributor
Darryl,

   Where are you making your code changes and what exactly do you mean by ?


I have made changes to the "WidgetTemplate.mxml" file where it creates the default widget.  I changed the wCanvas.y = 0 to wCanvas.y = 100.  That shifted the widget when maximized down below my banner which extends the width of the screen and makes it level with the dock manager that sits on the right side of the screen. 

I also changed the wIcon.y = 20 to wIcon.y = 120 so the icon would follow the widget box.

By changing the coordinates, I am assuming that all I need to change are the x and y coordinates of where the widget opens and where they rest when they are minimized.  If that makes any sense.


Thanks for your help!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Darryl,

   I think the effect that you are after is better handled by adding

top      ="100"
to the WidgetManagerDocked.mxml in the very top (first) canvas element and change back all of your other changes to the WidgetTemplate.
0 Kudos
TristanKnowlton
Frequent Contributor
Thanks Robert, much easier than what I was attempting.
0 Kudos
grahamcooke
Regular Contributor
I wasn't sure whether to start a new thread or not, but I'll try tacking my question onto this one first as it is semi-related.

How do I change the opening location of 1 widget only? I have one particular widget which will be multi-functional (tabbed view) and contain a lot of information. I would like this to open at the bottom of the screen, span the whole width of the screen and be "hideable" whilst still being open (like the current widget sidebar)

Could someone help with this please?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Graham,

     From the sounds of it you really don't want to used the widget model for that particular one. You just need to create a canvas component that does all the things you want like have states for minimized etc. and just add that mxml component to the SiteManager.mxml.
0 Kudos
grahamcooke
Regular Contributor
Robert, thanks for your reply.

Sorry for my delayed response, I have been away.

I am using v1.3 of the sample flex viewer. i cant seem to find a sitemanager.mxml. Am I being completely stupid or is there a typo in your last reply. Did you mean sitecontainer.mxml? or possibly widgetmanager.mxml?

cheers,

Graham
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Graham,

   Sorry I did mean sitecontainer.mxml.
0 Kudos