![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Absolute Placement of DBEs Topic Summary: Placement based on X- and Y-Coordinates Created On: 7-Jul-2008 21:11 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
The challenges of using contrained placement have been mentioned in several threads. There are several factors which make placement challenging. For one, you have to place DBEs in the order in which they are defined. Second, the placement is not consistent across all types of DBEs -- "flush" and "aligned" do not work as expected with buttons, and DBEs that use labels get placed differently if the labels are null.
This older post about using hidden frames to position DBEs got me thinking... maybe one could develop an "absolute placement" method for DBEs, using this approach. For the most part, it can be done. I've developed a series of functions that create DBEs, and position them relative to frames, and then hide the frames. The functions use "offsets" based on some trial and error. The DB function attached demonstrates this absolute positioning. Try it out. If your screen resolution is less that 1600x1200, the DB will run off the sides of your screen. Edited: 7-Jul-2008 at 21:23 by David Jakad |
|
![]() |
|
![]() |
|
David, that is a superb piece of work!
------------------------- Tony Goodman Smart DXL limited www.smartdxl.com |
|
![]() |
|
![]() |
|
Also see my wrapper for constrained placement on Kevin Murphy's site.
It's an excellent piece of code David. The biggest issue I see with it is that there is a lot of wasted space on a dialog box which means you have to make your dialog box bigger. And I don't believe most companies provide their employees with monitors that have a 1600x1200 resolution. I am always trying to make any of my tools that utilize a dialog box fit inside a 1024x768 space or smaller. That way the person can have both my tool up and still see other things on their screen. ------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|
![]() |
|
![]() |
|
I'm glad you like it. I agree more improvements could be made. I just tried to provide a quick demo to show how the concept worked. Another nice side-effect of this method is, DBEs are not placed in relationship to each other, so you can create DBEs in any order you wish. Also, you can "squish" DBEs closer together to save even more space in your DBs.
One improvement might be to combine the individual functions into one larger single more-compact function, since most of the code is similar. You could end up with something like: DBE fnPosDBE(DB xDB,string typeOfDBE,int xPos,yPos,width,height,string initValue) Also, it cases of DBEs which can take labels, I chose to just make them null to simplify things. But, you could add additional scenarios for these cases, and adjust the placement accordingly. In my implementations, I build in a sort of "register" fuction, which loads the DBEs into a global skip list which I use to manage the showing/hiding on tab strips. Some oddities you may have noticed... 1.) I included the "frame grid" and "canvas grid" to demonstrate that the DBEs were placed and aligned as specified. You may have noticed that certaing DBEs (such as the tab strip) disappear when the frame grid or canvas grid are shown. Odd. 2.) No matter how hard I tried, I could not control the width of the slider DBE. It always wants to be about 250px wide. It will stretch if you anchor the right side to "form", but other than that, you are out of luck. |
|
![]() |
|
![]() |
|
Fantastic job, David Jakad. WOW.
I wish DOORS would have a WYSIWYG editor but I would settle for this instead. With many years of DXL, GUIS is always my weakness. ------------------------- pete.kowalski(at)motorola.com |
|
![]() |
|
![]() |
|
Here's a more-compact, single-function version of this. You'll notice that this nearly eliminates the normal "->" style constrained placement.
Interstingly, this absolute positioning allows you to place DBEs on top of or inside of other DBEs.... opens some interesting possibilites. Edited: 9-Jul-2008 at 23:33 by David Jakad |
|
![]() |
|
![]() |
|
Pete have you tried my dynamic dialog box?
------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|
![]() |
|
![]() |
|
Hi David,
This is a fantastic post. Since a list and a radioBox require a specific array to be assigned, we cannot create more than one of each with the present function. If I have to create more than one of each, do I have to repeat the function (with another name) and assign the arrays to them? That is what I am doing now. If there is any workaround, please let me know. - Krishna |
|
![]() |
|
![]() |
|
@ David Pechacek:
No, I haven't tried your version yet. I will take a look at it today. Thanks. ------------------------- pete.kowalski(at)motorola.com |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Absolute Placement of DBEs
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.