Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

vid: linking position of several elements

 [1/2] from: robert::muench::robertmuench::de at: 12-Feb-2002 9:33


Hi, I'm currently trying my first real-world applications using /View and have some questions: I use the subpanel method to display different dialogs to the user. The presented page is build by combining several independend faces into one face. The subpanels can have different sizes, so that the container face needs to be resized on demand. 1. What's the best way to layout several panels like: panel1 return panel2 But panel1 and panel2 will have different sizes. So I need to reposition them by altering the /offset. Is there a way to link a formular to offset? Something like: .../offset/y: panel1/offset/y + panel1/size/y in a way that this formular gets evaluated and the display updated as soon as some values of panel1 change? 2. Does anyone know the rules /View & VID use to determine which faces needs to be set dirty and when these are redrawn? Isn't this handled automatically? 3. How can I remove a subpanel from the cotainer face so that it's hidden? 4. Is there a documentation about the event system, the events and how they are fired available? -- Robert M. Münch IT & Management Freelancer Mobile: +49 (0)177 2452 802 Fax : +49 (0)721 8408 9112 Web : http://www.robertmuench.de

 [2/2] from: greggirwin:mindspring at: 12-Feb-2002 10:56


Hi Robert, << I use the subpanel method to display different dialogs to the user. The presented page is build by combining several independend faces into one face. The subpanels can have different sizes, so that the container face needs to be resized on demand. >> To resize the main layout, you can do this: view lay: layout [button [lay/size: 640x480 show lay]] << 1. What's the best way to layout several panels like: panel1 return panel2 But panel1 and panel2 will have different sizes. So I need to reposition them by altering the /offset. Is there a way to link a formular to offset? Something like: .../offset/y: panel1/offset/y + panel1/size/y in a way that this formular gets evaluated and the display updated as soon as some values of panel1 change? >> How best to position them will depend on the layout design you're after. You can store the current position in a layout with HERE, and you can use AT to position things at fixed locations. As far as hooking into the events, you'll probably have to manage that yourself by calling functions when you want things updated. << 2. Does anyone know the rules /View & VID use to determine which faces needs to be set dirty and when these are redrawn? Isn't this handled automatically?
>>
If you change face data programmatically, you'll probably have to SHOW them again yourself, to redraw them, from my experience. << 3. How can I remove a subpanel from the cotainer face so that it's hidden? >> See Brett's recent post on this. The best solution I could come up with (I haven't tried Brett's trick yet) was to move it off-screen temporarily, then restore its position to display it again. << 4. Is there a documentation about the event system, the events and how they are fired available? >> The doc How To Handle User Interface Events is one source of information. Brett's VID Notes script is another good source of info. --Gregg