How to add Combo Feature in a ContainerShape Graphiti - eclipse-emf

I want to add a drop down combo box filter inside a container in the Graphiti Editor.
It appears if I override this method:
public IDirectEditingFeature getDirectEditingFeature(IDirectEditingContext context)
...as shown in the figure below:
...but my requirement is not to bring the drop down feature on clicking over the region, but a stable combo control on the Shape/Container as shown below:
Is there any way in Graphiti to add such controls on Shape?

Related

add a custom query to print management setup

I have to add a SySQueryRun dialog inside print management setup in Ax365 when the button Select is clicked
(see image):
How i can achieve this point?
is there any std code which do the same thing?

How to expose standard back button in view controller navigation?

I need users to be able to navigate a data hierarchy (master level, detail level) and to create new master and detail objects accordingly. Both master and detail use arrays for their model and TableViews for presentation
The navigation flow for this uses 2 navigation and table controllers like below. The + of the master and detail TableViews create new objects, the forstTableCell navigates to the second TableView using a segue:
While the screenshot shows "Done" right now even when removing that ButtonItem the slot remains empty.
I would like to show the standard back button instead: "< Middlewares" in this case. In the tests I've only been able to get the back button when navigating to a normal ViewController, but not to another NavigationController. Is it possible to have it between Navigation Controllers, too?
Simply remove the second navigation controller. If you use a push segue, your second view controller will still have the navigation bar. As long as you don't use a modal segue all view controllers that are pushed will have a navigation bar.
So your storyboard will look like this:
You will then automatically have a back button. If you want to change the text of it, go to your navigation item of your first view controller and change the back title accordingly as shown in this screenshot
You certainly want to have a title in your second view controller (something like "Add [whatever you want to add]". So simply drag & drop a UINavigationItem on your second view controller then you can also add UIBarButton items in your Interface builder
Controlling the look/feel of the Navigation Bar Buttons
You can achieve the behavior you want by opening the Document Outline and find the existing Done button. If you have a UIBarButtonItem type, you can simply change the type to Custom in the Inspector. Next add a regular button within the UIBarButtonItem (just bring the Navigation bar for the target controller into the zoomed in view of the storyboard/xib). This will allow you to drag a button onto the navigation bar.
Once you have a standard button you can add an image with the back arrow. Then add supporting code to use the pop behavior on the Navigation bar. Since you can have only one root navigation controller, you may want to remove the second UINavigationController and add a UINavigationItem from the objects library and then subsequently add the buttons, titles of your choice. This configuration will allow you to leverage all of the push and pop methods available, while retaining full control of the look/feel/behavior of the navigation stack.
More on customizing the look/feel/behavior of the UINavigation Stack can be found at: Navigation API Docs

How to show "edit image" in Sitecore experience editor?

In sitecore "content editor" we can use the "image editor" by clicking "edit image" in the data section, but in the experience editor it is not visible.
is there a way to make available for editors to use the image editor? or this behavior is a sitecore standard?
thanks for help
Picture field
I've just written it up in a blog post.
First you'll need to add a new button under
/sitecore/system/Field types/Simple Types/Image/WebEdit Buttons
You can duplicate one of the existing ones and change the icon and text yourself. Make the contents of the Click field:
chrome:field:editcontrol({command:"webedit:changeimage"})
(there's already a webedit:editimage so we can't name it that).
Open App_Config\Include\Sitecore.ExperienceEditor.config and duplicate the entry for webedit:chooseimage. Change the command name to webedit:changeimage as per above. Then change the type to the class you will create below.
If you have access to a decompiler, take a look at the existing command Sitecore.Shell.Framework.Commands.Shell.EditImage as well as the existing command
for selecting an image in Experience Editor Sitecore.Shell.Applications.WebEdit.Commands.ChooseImage. You'll see that they're similar, but unfortunately they use two different
methods of opening a dialog (Windows.RunApplication and SheerResponse.ShowModalDialog) so we can't reuse the existing class as-is. I have created a class that uses a bit of both (link below).
Create your class (eg. EditImage.cs), make it serializable and inherit from WebEditImageCommand like the other EE buttons. I have posted the full class as a gist for you.
When you select an image in the Experience Editor, you should now have an extra button in the list which opens the image editor in a modal window when clicked.
You need to do next steps, is not the most elegant way but you can do it:
In the Experience Editor, click the image that you want to edit, and in the floating toolbar that appears, click More and then Edit the related item. This opens the item in the Content Editor, from where you can scroll to the field that contains the image and click Edit image.

exposing subcontrols from the custom widget plugin in QT

I am using QT 4.3. I have created one custom widget plugin. I could be able to show it in the desiner tool box as well as use it on the form with no problem.
This custom widget internally holds QGroupBox, QLabel, QTextEdit.
Now I want to apply the styles to individual componets of this custom widget.
I want to expose these internal conrols as sub-control and style them. This would be similar to tear subcontrol of QTabWidget. In style sheet we can refer it as QTabWidget::tear...
Is there any way by which I can do similar thing with my custom widget?
The subcontrols are defined in the (internal to Qt) knownPseudoElements array in qstylesheetstyle.cpp, so you won't be able to add your own pseudoelements. However, you can use the ID Selector feature to address individual controls in your widget. For example, if the names of your QGroupBox, QLabel, and QTextEdit are group, label, and edit, you can use:
#group {color:green} #label {color:blue} #edit {background-color:red}
to change the sub-widgets

MFC - How can I disable a list item?

I have a CListCtrl with checkboxes. I want to be able to disable one of the items so that the user cannot click the checkbox. Is this possible? If so, how?
Edit:
Found the specifics on how to hide a checkbox in another question
Need only some rows in a CListCtrl control to have check boxes
Shortly: Not easily possible.
You'll need to sub-class the CListCtrl and implement this behavior on your own or download for example the MFC Grid Control that allows you to do that.
As for the removing check-boxes idea, yes, that might be possible, MSDN:
Version 4.70. Enables check boxes for items in a list-view control. When
set to this style, the control creates
and sets a state image list with two
images using DrawFrameControl. State
image 1 is the unchecked box, and
state image 2 is the checked box.
Setting the state image to zero
removes the check box.