Bpmn.io properties doesn't change - bpmn.io

How can I add the property isExpanded:true to the shape of a bpmn custom Element?
How can I change the size od my custom Element inside the Palette?

Related

How to change sub label or main label auto based on condition in roomle?

I want to the sub label will change when the properties changes. Of source, I will set name of lable in event update.
image
You can find how the label and sub label is put together in the docs.
Since I don't think it's possible to change of the root component label in the Roomle script, the label cannot be changed on demand.

How to use two properties for a single property editor?

Refer to this prior question/answer combo of mine. It's describing how to create a property editor for the IDE.
I've created another property editor for a completely different purpose. In this case, it's a glyph character selector of type String (because it could contain more than one glyph character). Unlike my other one in mentioned question/answer, this one is very specific to a particular property on a particular TCollectionItem class of mine.
All is good, and I can invoke this property editor for this particular property. However, I have a dilemma. The property editor, by nature, is directly related to a font. The user may choose a character (glyph) from a particular font. My property editor has the facility to change the font, and browse the glyphs contained within that font.
This component of mine also has the facility to specify the font, in a separate TFont property. The problem arises when it comes to the combination of both my Glyph property and Font property being used in the very same property editor. When I invoke this editor for the Glyph property, it also needs to know the Font which it needs to use. On the contrary, when user chooses a font and glyph character in this editor, it also needs to update both the Glyph and Font properties.
Long story short, PropertyB depends on PropertyA. If PropertyA changes, then PropertyB will have an entirely different set of possible values. So, whatever editor I install in the IDE needs to allow the user to change both PropertyA and PropertyB at the same time.
How can I make a property editor have access to more than one property?
TPropertyEditor has a public GetComponent() method that you can use to access the object(s) whose property is currently being edited (multiple objects with the same property can be edited at the same time, if the property editor allows it). Then you will have access to all of the other properties in the same object(s).
That being said, if your editor displays a pop-up dialog for editing, it should be implemented as a component editor instead of (or in addition to) a property editor. A property editor should edit only one property at a time, though it may have read-only dependancies on other properties. For instance, a Glyph property editor that also edits the Font property, and vice versa, is not a good design. But a component editor that edits both is perfectly acceptable.
Solution 1
Instead of a property editor, implement a component editor. Such a component editor will have access to the entire component, not just a single property.
Solution 2
Wrap both of your properties inside of a dedicated TPersistent class, and then create a TClassProperty property editor for this class instead. The individual properties will not actually invoke a property editor. Instead, their parent TPersistent will invoke a combined property editor which has access to all the properties within this class. A good existing example is the TFont editor.

how to add bootstrap grid in side of my main RTE in umbraco?

I have a Document Type which has a main content box (RTE). now I wand add a grid layout inside it and add "Partial View Macro" to this grid cells.
for example create a 1*3 grid and add a summery card inside of each cell. like this view :
in this case I implement card as a "Partial View Macro"
You should be able to create a macro that can point to a separate node that contains a Grid Layout property and similar to a template calling the GetGridHtml() extension method, you can call it from your macro code like this:
Html.GetGridHtml(gridNode, "gridLayourPropertyName");
Where gridNode is an IPublishedContent object that your macro can have as a parameter, and "gridLayourPropertyName" is the Grid Layout property of that node.
I haven't used this technique using a Macro from a RTE, but I've done something similar to build a grid within another grid layout. This may not be the best technique to follow and I'd strongly recommend looking into replacing the RTE property with a grid layout. You can use RTE as a grid editor, so you could migrate your existing property data and then you will have all the flexibility to create/configure/customize grid editors using current best practices to meet your requirements.

Why some properties are hidden from Object Inspector when more than one item is selected?

I've noticed that some properties disappear from the Object Inspector when selecting more than one item.
Why does this happen and how to control this behavior when creating a component?
Example:
Add 2 buttons (TButton) to a form and select one of them.
In the Object Inspector you can see all TButton's published properties (Note that there's also the Constraints property).
Add the other button to the current selection (Click while pressing Shift key).
As you can see, some properties have been hidden from Object Inspector (Note that the Constraints is no more visible).
Whether a property is displayed when multiple objects are selected is controlled by the property editor configured for that property. Property editors (descended from TPropertyEditor in DesignEditors.pas) have a GetAttributes method that returns a set of attributes that apply to the editor. If the set includes paMultiSelect, then the property will be displayed.
Given that the property value is displayed as the constraint values, rather than just (TSizeConstraints), I conclude that that property is not using the generic TClassProperty editor. That editor sets paMultiSelect, but based on your pictures, the property editor to TSizeConstraints doesn't. It was probably an oversight.
You could try registering your own property editor. Find the property editor currently registered for TSizeConstraints (by searching the source code for TSizeConstraints, for instance) and, in a design-time package, declare a new class descended from that one. Override GetAttributes to return the value you need. Finally, follow examples elsewhere in the code to call RegisterPropertyEditor.

Positioning of custom list box item components in Delphi XE5, Firemonkey

I've customised the style of a Firmeonkey list box item in such a way that now it can consist of 4 TLables in it. Each of the lable has Alignment as alNone.
I'm setting position of each of them in my code whenever i need to add any item. I've observed that when my list has scroll bar and if first component is not visible (i.e. i've scrolled down enough) at that time if i re-add all the items again in list box, then the position of TLabels in first items (or items which are not shown) get distorted.
For setting positions I am using below code :
(tmpListBoxItem.FindStyleResource('txtCol2') As TLabel).Position.X :=
(tmpListBoxItem.FindStyleResource('txtCol2') As TLabel).Position.X + (tmpListBoxItem.FindStyleResource('txtCol2') As TLabel).Width;
Any suggesstions, how can i overcome this issue.
Regards,
Padam Jain
Firemonkey styles are repeatedly 'applied' and 'freed' as components appear and disappear from screen.
It is not enough to simply set properties of style objects once and expect those values to be remembered. What you need to do is either listen to the OnApplyStyleLookup event or override the ApplyStyle method of a custom component and use the same you have above to set the properties again.
This means you'll need somewhere to store the values you are going to set.
I would suggest for your situation that you subclass TListBoxItem so you can add suitable properties or fields and put your code in ApplyStyle.

Resources