Don't draw parent content - unity3d

Let's say I have a text object filled with dots (............). Let's also say that I create another text object as a child of the first text object, with the content foo.
Between each space in the letters of foo, there are clearly visible the dots of the parent. Is there a way I could filter the content of the parent?
Example:
I'd like to keep the semi-transparent white scroll panel and the hexagon background image, but I'd like to remove the dots behind the numbers 4500.

I would suggest using a Horizontal layout group instead
Parent (object with only the HorizontalLayoutGroup)
Child Object 1 : contains your ....
Child Object 2 : Contains your "foo" or numbers
The parent will have the total size of your current parent object (total width)
When setting Child2's text it will resize automatically, which will effectively hide the extra "dots".
No special hacks required
Link to get you started : https://docs.unity3d.com/Manual/script-HorizontalLayoutGroup.html

Related

Shape property which references documentsheet property doesn't get updated when documentsheet property changes

I have the following case:
I defined a user property ("User.DocProp") at the documentsheet level. I want to reference this property in a shape property cell ("Prop.SomeProp") and display the shape property as text on the shape.
This is working (I inserted a field into the shape text which points to my shape data). The value of the document property is correctly displayed on the shape.
And when I change the document property the shape's text gets updated. Awesome!
BUT this (update of the shape's text after change of the document property) doesn't work anymore when I have multiple pages each with the same kind of shape as before. When I now change the property on the documentsheet only those shapes get updated which lay on pages that I have navigated to before (since I opened the drawing). On all other pages the shape text will show the old value of the document property. Only when I directly enter the cell in the shapesheet by pressing F2 and leave with ENTER the text will get updated.
I tried several formulas in the shape property with no avail:
=TheDoc!User.DocProp
=SETATREF(TheDoc!User.DocProp)
=SETATREF(TheDoc!User.DocProp,SETATREFEVAL(SETATREFEXPR()))
I can't find a method to force recalculation of formulas neither. What am I missing here?
Screenshot from test drawing

Visio - How to access a shape parent's custom property?

I have grouped 3 shapes (simple square boxes) together. In each of those shapes, I would like to add a field that will display the value of a custom property defined in the "parent" shape (ie: the group).
I know that if the property was directly bounded to the shape I was adding the field to, the formula for that field would simply be: "=prop.MyProperty".
I've looked for something like: "=parent.prop.MyProperty" with luck. Any clue?
Although there nothing like "parent", you can use shape id directly. You need to find the ID (NNN) of the parent shape (i.e. of the group shape), and then use it in the child shape using the syntax like this:
=Sheet.NNN!Prop.MyProperty
The ID of the shape can be found using drawing explorer window (it displays shapes with ids), or "Shape Name" button on the "Developer" tab, ID() shape sheet function on the group (parent) shape, or shape.ID property VBA code.
If you are using VBA there is a Parent property.
IF VSOShp1 contains VSOShp2 and VSOShp2
Debug.Print VSOShp2.Parent
will show the name of the parent VSOShp1.
Debug.Print VSOShp2.Parent.ID
will show the sheet id of VSOShp1.
John...

Access Form layout and design: Header: How do I make my header section look like Google

I would like to rip off Google's design for my Continuous Form. The detail section of the form is set up to display N number of records resulting from a search, and thus cannot be used to create this effect (i think). Everything must go in the header section.
there are 2 primary issues I would like to address in this question:
Two toned background. The header section should have a grey stripe and a white stripe. This stripe needs to extend the full width of the form, which is variable and will depend on the user. (i'm using tabs not pop-ups)
How to right justify certain elements of the header so that they stay close to the right edge, wherever that may fall, just like your account information on Google.
The "Search Results" in the detail section are loaded by setting the form's recordSource to the results of a query defined in VBA, which takes parameters from the search box. The form is continuous.
Any ideas how to hack this into place?
Recent versions of MS Access provide improved form layout features when using the ACCDB database file format.
The screen captures below are based on a form in Access 2010. The second image is after the form width was expanded, but it's scaled down for display on this web page. However you can open those images directly to compare their relative widths.
The grey color is from the form header's Back Color property. The white box is a simple text box whose Back Color is white and Back Style is Normal (not Transparent).
The text box's Horizontal Anchor property is Both, and its Can Grow property is Yes. The other 3 items ("?", "Button 2", and "Button 3") are command buttons. Their Horizontal Anchors are set to Right and their Can Grow properties are No.
The result of those properties is that when the form expands, those command buttons maintain their size are are kept right-aligned within the form. And the text box stretches to fill the remaining available space.
Note this behavior is accomplished without any VBA code.
I think these layout capabilities were introduced in Access 2007 and perhaps refined in 2010.
For the background, use two rectangles with transparent borders, one back color gray, one white. You can size them to the form by using the form's InsideWidth property. For example:
Private Sub Form_Resize()
rect1.Width = Me.InsideWidth
rect2.Width = Me.InsideWidth
End Sub
I would do a similar thing for the buttons/images/etc you want right justified. Set their Left property relative to the form's width:
mySettingsButton.Left = Me.InsideWidth - 300
Keep in mind all the measurements are twips (1440 twips/inch)

GWT Drag and Drop within tree and between tree grids

We're using GWT and We're required to create two drag and drop tree grids. Each tree contains parents and children (max two level for now).
Here's what we need to be able to do:
Use cases
Drag a parent from one tree grid to the other.
Drag a parent 1 to parent 2 (1 will become child of 2, and all 1's children will become children of 2) -> please don't ask :D
Drag a child from one parent to another (within the same tree grid)
Drag a child to top level within the same tree grid (child will become a parent)
Drag a child to the other tree grid with two options
1 - Top level - child from tree 1 will become a parent on tree 2.
2 - Parent - Child from tree 1 will become child of a parent on the tree grid 2.
If this doesn't make much sense, we don't have the full context yet, so that's all we know.
Problem
We can drag on the same tree grid. If the row we want to drag the cell to is hidden, we set the scroll to true, so that the grid scrolls when the user is dragging inside it. Something like so:
private void setDraggableOptions(DragAndDropColumn<?, ?> column) {
// retrieve draggableOptions on the column
DraggableOptions draggableOptions = column.getDraggableOptions();
draggableOptions.setScroll(true);
// use template to construct the helper. The content of the div will be set
// after
draggableOptions.setHelper(HelperType.CLONE);
// opacity of the helper
draggableOptions.setOpacity((float) 0.8);
// cursor to use during the drag operation
draggableOptions.setCursor(Cursor.MOVE);
// set the revert option
draggableOptions.setRevert(RevertOption.ON_INVALID_DROP);
// prevents dragging when user click on the category drop-down list
draggableOptions.setCancel("select");
column.setDraggableOptions(draggableOptions);
}
Now the problem is, setting the tree grid to scroll, the user will never be able to drag the object to the second tree as the scroll will try to keep the object always inside the grid.
We're using the gwtquery-plugins
Is there any idea to work around this? Thank you very much in advance.
See my response to your question here

add row to refreshingView without repainting entire refreshingView

We have a refreshingView<shirt> (contained inside a border) set up and outside of the refreshing view we have an ajaxLink that adds a new shirt object to the list that backs the refreshingView. The refreshingView contains textFields and dropdowns for the user to enter information in about the shirts.
Inside the ajaxLink we add a shirt to the list and then add the entire border to the target of the ajaxLink, thus refreshing the border. The problem occurs when you add a row and fill out the information ( shirt color, size, style, etc. ) and add another shirt. Another row for a new shirt is added, but at the same time all the information that was inputted about the first shirt is lost.
Any ideas on how to retain the information of the previously entered shirts?
The previous data is lost, because a refreshingView discards all Items (and the models containing the data) after each rendering.
You can set an ItemReuseStrategy:
refreshingView.setItemReuseStrategy(new ReuseIfModelsEqualStrategy());
Another, more involved way is to only redraw the newly added row. See the answer here: Can I add an element to a RepeatingView without refreshing the latter?