When defining a theme for the Alloy Visualizer, there is the option for a relation to "Influence Layout". Normally, when p->q is an edge in the relation r, the layout places p above q, with the r-edge pointing downwards. I would expect that turning off "Influence Layout" for r would allow p and q to occupy the same level in the graph, so that the r-edge could point horizontally. But this never happens. Indeed, I have never observed the "Influence Layout" checkmark to have any effect at all. What does it do?
Related
I'm new to alloy and i'm doing a little project. In the project i have some instances with different attributes that, with magic layout, i can put in the instance when showing the model. Is there a way to do the same thing with integers? I attach an image that i hope can describe better my issue, in the image you can see that the attributes occupied and type are in the socket, but the socketID no. So, i also wanted to put the integers (for example) in the socket to have a show without some useless instances/relations. I tried with the same approach used for the other attributes but is not working. I think it's because is an integer and not a custom sig.
I hope that the question is clear and thanks a lot in advance.
Not sure it's due to Magical Layout, unless they have implemented a special treatment for ints.
Anyway, the solution is to customize the "theme" yourself:
open the theme customization panel (e.g. by clicking the Theme icon).
Now two trees are displayed on the left, representing (top) the signature hierarchy and (bottom) all relations in your model: click there on socketId and then, at the top of the left panel, tick "Show as attribute" and untick "Show as arc", then apply your new theme by clicking Apply (top right), then click Close to close theme customization.
I'm trying to remove the seemingly forced left and right padding on a storyboard, need to anchor my view on the border on the Storyboard. Doesn't seem to give me the option to anchor on the border in the interface builder.
Most probably not best practice, but the design looks weird with this padding.
How can I remove the white space on the left and right:
Update:
I have checked the constraint value, its bound at zero on superview.
It only works if I use -20 and 20 for trailing and leading. Need to change superview itself?
When your on the storyboard select the control you want to have edge to edge, and in the properties window if you select layout you will see the constraints that you've added.
You would want to double click on the 'leading margin space'and set it's 'constant' value to 0 (this can be a bit buggy sometimes, so it may show 0 already, simply remove the 0, re-enter the value 0 and save)
Finally repeat the first step and select the 'Trailing Space' constraint and do the same thing.
once done press on the square icon which visually adjusts the control into it's new constraints and it should be edge to edge.
If you are in Xamarin using Visual Studio I finally discover how to tackle this annoying problem.
Click on the widget or view in the storyboard. In the properties window->layout you can see the constraints. Click on the constraint.
Before I was using -20 for constraints:
Now I fixed by having a constant of 0 and changing the constraint configuration:
Just remove the selection on the "Relative to Margin" checkbox.
Open your Storyboard using Xcode and remove the existing Leading and Trailing constraints and add it freshly by Unchecking the Constrain to margin checkbox while adding Constraints.
I have a cell (call it A) which is used once in a hierarchically higher cell (call it P). When I place A in P, its borders are rather larger than the actual content of A. When I descend to A and zoom-fit, it is way zoomed out, indicating there is something present way out on the edges.
I may have dragged objects there at one point but currently there is nothing visible. It is driving me crazy in terms of aligning objects, etc.
Is there any way to clean this up or something?
If I recall Cadence used to have a problem with leaving steiners behind when you moved routes. They are not visible but the db treats them as real objects for the bbox calculation. According to Cadence, deleting the objects should not harm anything. Open the layout in edit mode and paste this code into the CIW. This will delete all the steiner objects in your layout. If this was the root cause after saving you should see the bbox return to normal.
cv=geGetEditCellView()
foreach( item cv~>steiners
dbDeleteObject( item )
)
This thread may be considered "dead," but hopefully this helps.
It is possible the layers that are not visible are turned off.
To turn them on, go to the layers pane on the left. (If it is not there you can turn it on by going to Window —> Assistants —> Layers)
You can then click the drop down arrow in the top right corner and click Edit Valid Layers.
Then, click all valid in the Set Valid Layers popup. Click Ok.
Finally, check the Used Layers Only checkbox in the Layers pane. Look for any layers that weren't there before that you don't need.
Usually it happens when you draw the cell in LayoutXL, particularly when you insert pins.
Layer and purpose in these pins are selected separately for some reason, that is why it is easy to enter "impossible" combination.
Nothing happens, then you do it again and continue drawing. But there are several invisible squares that will continuously frustrate your inner perfectionist. You do the following:
Open this cell's layout, switch to Virtuoso window and enter:
lppList=list()
then:
foreach(shape hiGetCurrentWindow()~>cellView~>shapes if( (member(shape~>lpp lppList)==nil) then lppList=cons(shape~>lpp lppList)))
You have created the list with all layers in this layout, you can view it by entering:
lppList
You'll get something like this:
(("NW" "drawing")
("NP" "drawing")
("weird" "guy")
("M1" "pin")
("M3" "pin")
)
If you find a weird guy in this company, just enter the following command:
foreach(shape hiGetCurrentWindow()~>cellView~>shapes if((shape~>lpp == list("weird" "guy")) shape~>lpp = list("prBoundary" "drawing")))
If you see that some squares, labels (or whatever unseen before) appears as prBoundary, just delete it, save, and your layout will be small and shiny again.
I'm trying to use the "snap to grid" feature on Enterprise Architect Diagram mode and it seems like it's not working. All elements and connectors didn't snap to the defined grid size (they still moving freely - pixel by pixel - when I drag and move them).
Does somebody know how to snap all elements and connectors to grid or, at least, to move the connectors pixel by pixel - like elements do when pressing SHIFT + arrows?
for that you should use 'Snap to Grid' option from 'Diagram' menu.
There you can select one of two options: 'Standard Grid' and 'Smart Placement'
Documentation says:
Standard Grid - constrains elements to the grid when they are added to diagrams
Smart Placement - places elements even distances away from other elements and spaces elements evenly
If neither of these options are enabled, the elements can be placed freely on the diagram.
Ensure that you have that option enabled
If it is not working try to reload diagram after point 1
BTW. For alignment elements on a diagram you can use more options from context menu (select elements and click right button):
I have a project which have three dialog, Let's say A, B, C.
And A contain B & C, B contains C.
They all are inherited from a DialogBase class
and have a setBitmap function to set a background image.
And I have add the relationship that every time drag on C, B will drag as well.
and B is a transparent dialog!
When onLbuttonDown is triggered, I will set this
m_pParent->ModifyStyleEx(0, WS_EX_TRANSPARENT); which make that the B dialog is transparent.
The problem is : if i set this, the dialog B is transparent, but when I move the B, it will keep flicker.
But if i comment
m_pParent->ModifyStyleEx(0, WS_EX_TRANSPARENT);
Then the dialog B will not be transparent, but it will not flicker.
Can someone give me a solution ?
WS_EX_TRANSPARENT is a hard style to understand. It probably doesn't do what you think it does.
When you set WS_EX_TRANSPARENT for a window, you're not telling Windows to make it transparent - you're telling Windows that you won't be painting the entire window, so it has to draw the windows underneath before it draws your window. All you're really doing is changing the order of the WM_PAINT messages to the various windows.
You're seeing the flicker every time the dialog A repaints.
If you really need to see parts of dialog A through the background of dialog B, you can do some special processing in your OnLButtonDown. Start by setting the visibility of dialog B off, then create a bitmap, assign it to a DC, and have dialog A draw to that DC. Now you can set dialog B to visible again, and every time you paint it you start by copying the appropriate section of the saved bitmap to the background.