Re: Community feedback on new Developer toolkit feature requested

Luke Davis

Without actually experiencing this, my first guess at a good mechanism would be for me to be able to designate a target object for relative positions to be given from; and then have the ability to switch back and forth between designated target and full screen as you described.

So in your example, after I learned the dimensions of the dialog, I could press something to set it as my target for relative measurements, and then work on the button.

That, I think, avoids deep nesting problems.


On Sat, 27 Jul 2019, Andy B. wrote:

I am requesting the community’s feedback on a feature for Developer toolkit. Before proceeding with the new feature’s description, I must provide a sample
problem a user might encounter while using DTK. Imagine you are a user of DTK. You wish to make a dialog in the top-right corner of your display with a
button centered in the dialog. The dialog is to have the dimensions of 100px wide and 100px high. The button is to have the dimensions of 75px wide and 25px
high. You know the display resolution is 1920px wide and 1080px high.
You confidently code up the dialog to sit in the top-right corner of the display. To verify, you launch the dialog, turn on DTK, navigate to the dialog,
then obtain its size and location. After checking the size and location, you are happy with its placement: (left, top, right, bottom): 1820, 0, 1920, 100
[100px wide and 100px high]. You proceed to place a button in the dialog. To verify the button’s size and location, you launch the dialog, put focus on the
button, turn on DTK features, and obtain the button’s size and location. To your horror, the location is (left, top, right, bottom): 1820, 0, 1904, 25)
[75px wide and 25px high]. It is a reasonable guess that the button is in the top-left corner of the dialog. However, you might have to perform some math to
figure it out. Now, imagine what this would look like with a fairly complex design or layout… Messy at best! The problem is that all object locations are
reported relative to the entire display. This method is useful for gross layouts such as setting up foreground window placement, or header, footer,
multicolumn website layouts. Even the web layouts provide their own issues. Wait though, there is a solution to the problem!
The proposed feature I would like comments on is the ability for DTK to provide location information relative to the focused object’s parent. In the example
given, you could ask DTK to give you the locations of the left, top, right, and bottom edges based on the distance between the focused object and its
parent’s edges. For instance, DTK would report the button location as (left, top, right, bottom): 0, 0, 75, 25. You could still obtain locations based on
the entire display’s size though. Implementing this isn’t difficult, but I need feature requests and implementation ideas from a user’s point of view. How
would you see this feature implemented?

Join to automatically receive all group messages.