Modelling an Awkward Object

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

I’m trying to model an object that represents the equipment that is required
on a boat. As the size of the boat increases so does the amount of gear.
Currently I have a different form for each of the size categories but I’d
rather have one form and manipulate it programmatically. I’d need to be able
to resize the form based on an objects size property and then position the
controls on the form accordingly.

If anyone has a nice solution to this that would be great.
 
As a fer' instance, have you considered using XML to model
the object as it seems you need an eXtensible tree to represent
the object. Using XSLT(ransformation) would allow the tree to
be transformed dynamically so the form can conform to the
changing user interface requirements.
 
Thanks for your help Clinton, to take your fer' instance a stage further. I'm
modelling a boat object that has a length so for two different boats
boat.length = 10 or boat.length = 20 say. I know this when I create the XML
file so I build the file with only the appropriate elements for that boat
length (therefore no transform required). My problem arises when I pull the
data back into the application.

Say there is 5 controls on screen for the smaller boat and 10 for the
larger. the first 3 are common but need to be repositioned depending on the
boat size and the From that the controls are on needs to be resized too. I've
tried changing these (location.X and Y) in the onload event but no joy. I
need the UI to change based on the contents of the XML file. So at the
moment I have a different form for each length range, very ugly! any
suggestions as to what I should do to use one form and change positions and
sizes dynamically? Thanks for your help.
 
Back
Top