Hi,
May be there is an obvious solution to this, though I can't seem to find it. If there isn't, then I take it as an improvement suggestion. I am designing a ShellView with the ViewComposer. After a while of carefully setting FramingContraint's arrangements, I want to try it out and see how it works. When I see that the usual resizing works ok, I seek for the minimum extent that still looks fine. As soon as I resize the window to the desired extent and have no way of obtaining the values and thus copy them to the property. What I do now is to leave the test opened, arrange windows accordingly and begin with trial and error: changing the minExtent property ant testing again until I get the desired size I see on the previous test. There should be an easier way, perhaps defining a shortcut that copies the current extent to the clipboard when the test is running. What do you think? Regards, Daniel |
Hi Daniel,
If you're using D5, you might try using the Visual Object Finder to inspect the running test window and all its contained views, layout properties, etc, to see exactly what the values are when you've resized things the way you want them. (It might not be the most elegant thing, but then again, when you're using a FramingConstraint layout, it's like twiddling bits anyway.) -- Louis |
In reply to this post by Daniel Rozzeta
"Daniel Rozzeta" <[hidden email]> wrote in message
news:[hidden email]... > Hi, > May be there is an obvious solution to this, though I can't seem to > find it. > If there isn't, then I take it as an improvement suggestion. I would suggest that you try using the Visual Object Finder. It is that magnifying glass over a beach ball on the tool bar of most IDE windows. Click it and then click on the window you are testing. You can then examine all attributes of the window. If you display "self view extent" you can get the extent and can copy it to the clipboard to use for the min or max extents. I think you could also enhance ViewComposer<<viewTest to add some hooks (accelerator keys or events) to accomplish what you want to do. If you find an elegant way to do this and post the code perhaps it will find its way into the image. Chris |
In reply to this post by Daniel Rozzeta
Daniel,
Your description reminds me working on a pretty ugly view that I edit from time to time. In its original form, it predates FramingLayout (in fact, it predates Dolphin). In Dolphin's early days, I quickly learned to use nested container views with proportional layouts, and that trick still works. Depending on what you are trying to do, it might make things easier. You might also want to take a look at my Wizardry package which includes an IDE extension for the VC that does some things with framing constraints. It probably does not do what you want, but you are welcome to extend it. Have a good one, Bill -- Wilhelm K. Schwab, Ph.D. [hidden email] |
In reply to this post by Daniel Rozzeta
Daniel,
> I am designing a ShellView with the ViewComposer. After a while of > carefully setting FramingContraint's arrangements, I want to try it > out and see how it works. When I see that the usual resizing works > ok, I seek for the minimum extent that still looks fine. As soon as I > resize the window to the desired extent and have no way of obtaining > the values and thus copy them to the property. > What I do now is to leave the test opened, arrange windows accordingly > and begin with trial and error: changing the minExtent property ant > testing again until I get the desired size I see on the previous test. > There should be an easier way, perhaps defining a shortcut that copies > the current extent to the clipboard when the test is running. The suggestions made by other posters to use the Visual Object Finder to locate and copy the extent of your test window are one way of achieving what you want. However, there is another way that remains entirely inside the View Composer which I commonly use: 1. Select the shell view in the View Composer and ensure that the #minExtent property is set to nil. 2. Now resize the shell view (i.e. the one you are editing; don't bother going into Test mode) to the minimum size. The FramingConstraints will be active so you can get a good idea of what a sensible minimum size is, in just the same way as you would in Test mode. 3. Find the #extent property in the View Composer and right click and choose "copy". Now go to the #minExtent property and right click it and choose "Paste Point". This will set the minimum extent to the current size of the shell view. 4. The tedious part of this method is that you now have to go back and resize the shell view to the default size that it was before you started this operation. However, I accept that it might be nice have an easier way to do this, so I've entered an enhancement request #1341. Best regards, Andy Bower Dolphin Support |
"Andy Bower" <[hidden email]> wrote in message news:<[hidden email]>...
> Daniel, > > > I am designing a ShellView with the ViewComposer. After a while of > > carefully setting FramingContraint's arrangements, I want to try it > > out and see how it works. When I see that the usual resizing works > > ok, I seek for the minimum extent that still looks fine. As soon as I > > resize the window to the desired extent and have no way of obtaining > > the values and thus copy them to the property. > > What I do now is to leave the test opened, arrange windows accordingly > > and begin with trial and error: changing the minExtent property ant > > testing again until I get the desired size I see on the previous test. > > There should be an easier way, perhaps defining a shortcut that copies > > the current extent to the clipboard when the test is running. > > The suggestions made by other posters to use the Visual Object Finder to > locate and copy the extent of your test window are one way of achieving what > you want. However, there is another way that remains entirely inside the > View Composer which I commonly use: > > 1. Select the shell view in the View Composer and ensure that the #minExtent > property is set to nil. > > 2. Now resize the shell view (i.e. the one you are editing; don't bother > going into Test mode) to the minimum size. The FramingConstraints will be > active so you can get a good idea of what a sensible minimum size is, in > just the same way as you would in Test mode. > > 3. Find the #extent property in the View Composer and right click and choose > "copy". Now go to the #minExtent property and right click it and choose > "Paste Point". This will set the minimum extent to the current size of the > shell view. > > 4. The tedious part of this method is that you now have to go back and > resize the shell view to the default size that it was before you started > this operation. > > However, I accept that it might be nice have an easier way to do this, so > I've entered an enhancement request #1341. > > Best regards, > > Andy Bower > Dolphin Support Thank you all for the answers |
Free forum by Nabble | Edit this page |