Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: DBE Placement
Topic Summary: A checkbox on the left, two buttons on the right
Created On: 17-Nov-2006 02:11
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 17-Nov-2006 02:11
User is offline View Users Profile Print this message


Chris Jones

Posts: 177
Joined: 1-Jul-2005

I'm trying to build a dialog box with a few elements on the same line. I'd like to have a checkbox on the left side (as usual), and two buttons opposite it, attached to the right side of the DB. See attached.

Does anybody have any ideas on how to do this? I've tried any number of different ways, with relative placement (using opposite() and such), and with constrained placement. The code shows some of my attempts.

I can attach one button to the right side no problem but can't figure a way to get two of them beside each other.....


Chris
Report this to a Moderator Report this to a Moderator
 17-Nov-2006 15:47
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

I defined 'cancel' to be opposite of 'icon' and then defined 'insert'. Then I moved 'insert' to have its 'right' boarder next to 'cancel'; thus moving it.

DBE placement is a nightmare. Many DBEs start attached to the sides. Many DBEs react differently to the left and right commands. Some DBEs placement is relative to their label.

Even after all these years I've NEVER corriographed a DB correctly. I take a stab at it and just play with the placement commands until it looks right.

- Louie
Report this to a Moderator Report this to a Moderator
 17-Nov-2006 16:40
User is offline View Users Profile Print this message


Dennis Lockshine

Posts: 113
Joined: 7-Apr-2003

In my solution, I eliminate the "opposide" and "beside" calls and use strict placement. I also use a hidden frame to enclose the two buttons and place the frame itself against the right edge of the form.

The result is a dialog box that can be resized, and the insert/cancel buttons are pegged to the right edge of the form. There is one caveat that you need to watch for and that is on some systems, the font size will be different and can cause some spacing issues.

Another way to create this box, if this is all that you want to appear, is to use the DBE element apply for your insert button. These always get added to the left of the close button, which is there by default.

-Dennis
Report this to a Moderator Report this to a Moderator
 3-Apr-2007 16:15
User is offline View Users Profile Print this message


Gordon Woods

Posts: 35
Joined: 2-Mar-2007

Further to this topic, has anyone any idea how to position the standard buttons (eg ok, apply) on the left side of a message box below the separator ?
I have tried constrained and relative placement both before and after the realize function but to no avail.. As the buttons are defined then they are always added to the right hand side in turn.

An example of what I want is the Links -> edit links menu option. I have a sneaking suspicion that it cannot be done using DB and will have to use DBE which can be placed no problem.

A rather clumsy workaround has been to use a large dummy button which I then hide.
Report this to a Moderator Report this to a Moderator
 4-Apr-2007 00:06
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

... I even have a large dummy button library function that takes the reasonable number of characters, converts these to pixels, and creates the dummy and hides it.

Nope, DB buttons don't want to move.

- Louie
Report this to a Moderator Report this to a Moderator
 4-Apr-2007 13:28
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

I find DBE placement very simple.  I never use the below() and such commands though.  I use the DBEName -> "right|left|top|bottom" -> <placement>  [-> DBE next to] syntax.

But yes. 

checkbox = <declaration>
checkbox -> "left" -> "form"
checkbox -> "right" -> "unattached"
checkbox -> "top" -> "form" (if you want it at the top. otherwise spaced from the item above it)
checkbox -> "bottom" -> "unattached"

buttonRightMost = <declaration>
buttonRightMost -> "left" -> "unattached"
buttonRightMost -> "right" -> "form"
buttonRightMost -> "top" -> "form" (or spaced from the item above it)
buttonRightMost -> "bottom" -> "unattached"

buttonLeftOfRightMost = <declaration>
buttonLeftOfRightMost -> "left" -> "unattached"
buttonLeftOfRightMost -> "right" -> "spaced" -> buttonRightMost
buttonLeftOfRightMost -> "top" -> "form" (or spaced from the item above it)
buttonLeftOfRightMost -> "bottom" -> "unattached"


-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Report this to a Moderator Report this to a Moderator
 10-Apr-2007 11:18
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Gordon, the example you mention is the Object Properties dialog.
This has Prev and Next buttons positioned to the left of the dialog at the bottom.
This is achieved by using constrained placement of button() DBE elements.
This dialog does not contain any apply, ok or close buttons as these cannot be positioned without using dummies as mentioned before.
The close botton can be removed by using close(db, false).

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 12-Apr-2007 17:58
User is offline View Users Profile Print this message


Gordon Woods

Posts: 35
Joined: 2-Mar-2007

I have since done some further investigations on this as suggested by David and Tony.
 
- yes constrained DBE placement was the only answer to this problem - so that the dummies option was not required.

I used a frame for the list objects and then attached the DBEs to the frame or the form as appropriate - Three points worthy of note - you can mix and match relative and constrained placement, you have to watch that you check all sides for attachment and it has to all happen before the realize function.

---------------
Gordon
gordon.woods@incose.org

Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 2 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 2 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.