Im using a DirectoryDialog like this:
public static String showDialog(Composite parent, String path)
{
log.debug("Showing submission directory dialog");
Shell shell = parent.getShell();
DirectoryDialog dialog = new DirectoryDialog(shell);
dialog.setFilterPath(path);
return dialog.open();
}
Works fine, but the view is not showing the directory provided by the path. It is selected but not shown:
Should be something like this:
Any ideas?
Thanks in advance!
IMHO it is not possible. These are native dialogs of underlying OS, so the behaviour of these dialogs may change one OS to other.
Automatic scrolling to the selected folder may not possible.
Also check whether it works: Open DirectoryDialog and hide the hidden folders, so automatically the filter folder will be visible.
Related
I have created a custom inspector using the UI Toolkit. The way I initialize the UI Document is as follows:
public VisualTreeAsset uXML;
This uXML is assigned through the inspector. Then in CreateInspectorGUI:
root = new VisualElement();
if (uXML == null)
{
Debug.Log("UI Document is " + documentName + " null");
return root;
}
uXML.CloneTree(root);
The root is the main root of the UI document (I am using UI Toolkit).
The problem is that when I enter play mode, the Inspectors disappears as shown:
I’m going to assume that you used a “Default Reference” for your editor script. Unfortunately, the default reference is only deserialised when you're in "Edit" mode. As soon as you go to "Play" mode, the reference is null.
The general way to get around the issue is to search for your asset when you create the inspector window:AssetDatabase.LoadAssetAtPath<VisualTreeAsset>("Assets/PathToYourFiles/YourFile.uxml")
Unfortunately, if you move your files somewhere else, you need to go in an update the string file location. Because it's a string path, there's no reference to follow the file if you move or rename the file. It's not clean, but it's easy, and gives you your inspector when in Play mode.
I did a quick search on the issue. Looking at this document, it seems Unity also suggest using Addressables or the Resources folder.
Because you don't really want the assets to follow you into a final build, I prefer placing them into an Editor folder, and just making sure I'm careful when moving or renaming the files. In one project, I made an automated process that "found" the file for me. It involved using a ScriptableObject and Assembly Reloads but I'm still in two minds whether the effort was worth it.
For some reason, TestStake.White is not able to open an old windows application (which i can successfully run(win 7) by doubliclicking on the exe). I want to use an existing window to perform some action using White. I have no idea as to how to take control of an already opened window using White.
I tried to open the exe using batch command, but I still couldn't get any success. It shows me a yellow screen(app background) with no mouse control. Hence I want to launch the app manually and perform some automation actions on it.
If you know the text in the title bar of the window:
using TestStack.White;
public static class Demo
{
public static Window GetWindow(string windowTitle)
{
var window = Desktop.Instance.Windows().FirstOrDefault(x => x.Name == windowTitle);
}
}
Is it possible to hide the re-assign button in the workflow dialog box for the users? and if so how?
Thanks
my solution may not be the best one, but it works for me. I hid the button using CSS.
Just go to the Application Designer app and use Export system XML action from Select Action dropdown. Then pick LIBRARY XML and save it somewhere on your disk. Open it (using WordPad preferably, Notepad is causing some issues when importing back to Maximo) and CTRL+F find Complete workflow assignment dialog. Go down a bit and you'll see <pushbutton> with label Reassignment:
<pushbutton id="completewf_b_4" label="Reassign" mxevent="directorinput" value="reassign"/>
Add textcss="reassign_btn" (the name is up to you of course)
<pushbutton id="completewf_b_4" label="Reassign" mxevent="directorinput" textcss="reassign_btn" value="reassign"/>
Then save the file and import LIBRARY.xml back to the Maximo using Application Designer app again. Then just edit your maximo.css file (located somewhere in \applications\maximo\maximouiweb\webmodule\webclient\ depending on which skin you are using) and add:
.reassign_btn { visibility: hidden; }
Hope this helps :-)
I want to customize the first dialog, which shows up, when I launch Form Builder. By default there are four fields: appName, formName, title and desription. I want to disable title field, and add some fields. How can I do it? Which files I have to edit? I know that, there is some file called dialog-form-settings.xml, but I don't know where is it.
Regards
This is the file you're referring to: dialog-form-settings.xbl. This file is in orbeon-resources-private.jar and if you override it, you can place your version in WEB-INF/resources, following the same path (i.e. WEB-INF/resources/xbl/fb/dialog-form-settings/dialog-form-settings.xbl).
I have a wxPython app, and in this app, I can select and copy text from various frames, but I can't do so from dialogs. Is there a way to do this?
I understand I could probably do this by putting some kind of TextCtrl in the dialog, but I'd like to be able to do this from a standard looking dialog.
EDIT:
Sorry, I should have been more specific. I can't select text from a wx.MessageBox under Windows Vista or Mac (don't have access to Linux to try that). Here is one example of the call to create the message box:
wx.MessageBox(str(msg), "Could not load ballots", wx.OK|wx.ICON_ERROR)
I am unable to select the text of the message box.
If you make a custom MessageBox like so, it will appear to be static text until you click on the text:
class MessageBox(wx.Dialog):
def __init__(self, parent, title):
wx.Dialog.__init__(self, parent, title=title)
text = wx.TextCtrl(self, style=wx.TE_READONLY|wx.BORDER_NONE)
text.SetValue("Hi hi hi")
text.SetBackgroundColour(wx.SystemSettings.GetColour(4))
self.ShowModal()
self.Destroy()
I've only tested this on windows, you might have to adjust the color for your OS.