I am writing a utility application in wxHaskell, and the users of this application will frequently need to copy-and-paste from the output of the application into other programs on their computer. The output of the program is fundamentally textual, and is displayed in a staticText widget.
How can I make it possible for the user to select the text in this staticText control? I can't find any attributes for making non-editable text selectable in the wxHaskell documentation.
Related
I have an old DOS application which accepts some files as input, does some calculations and saves results into file system. This app uses terminal as sort of GUI, where you can choose input files, types of calculations to perform and choose where to save the result. I don't know the logics behind calculations and am not able to reuse them in a new project.
The problem is that the users of this app want a modern looking GUI which will be easier to work with.
That is why, I have an idea to create an adapter which will translate button clicks into commands in DOS and grab text output to show in modern GUI.
Is it possible and where should I start from?
It is possible. How to start from depends on your programming Tools. If you use a RAD tool like Delphi or Lazarus or Visual Besic or ... then make your GUI design first and define Events after. For a Button click it is ButtonXClick(); In the RAD tool you will find a object inspector with properties and ther values and Events and their values. Go to Events page there, look for onClick-event. Double click there in the value line and you will get an empty Event handler, wehre you can write your Code for your application.
If you dont have or use such RAD tool, take a GUI Framework for DOS. Create your frontend and write your Code which is to call in Dependance of your button clicks.
I'm trying to write a plugin that will show text that is not user-interactable. In other words, the text is part of the background--visible but does not affect the text on screen. Is this possible?
If I understand what you're asking (which I'm not sure I do), then no, this is not possible using the ST3 public beta. You can set a view to be read-only using the set_read_only() method of sublime.View, but that only disables editing of the view's contents - users can still select and copy any text present.
Alternatively, if you're using the ST3 dev builds and Build 3072 or later, you can use the new tooltip API to create a popup. It is my understanding (I haven't played around with it on all platforms yet) that text in a tooltip cannot be selected, at least on Windows.
I know it's possible to take a dialog that you built yourself and parent it on another form. But is it possible to parent a standard Windows system dialog on a form that you designed?
Specifically, I'm trying to set up a form with multiple tabs that provide different ways to obtain a reference to data used by the program. One of those tabs should represent the file system, and the ideal way to do this would be with the standard Open dialog that can be instantiated with the COM identifier CLSID_FileOpenDialog.
Is there any way to take a system dialog and cause it to appear parented on another window, without the border, title bar, etc?
There are ways to use a hook, either via SetWindowsHookEx() or SetWinEventHook(), to grab a system dialog's HWND, then you can do whatever you want with it, such as call SetParent(). But just because you CAN does not mean you SHOULD. System dialogs are designed to run as their own windows, not embedded in someone else's window. A better solution might be to use the same Shell display components that are used by Windows Explorer (and system dialogs) via IShellFolder::CreateViewObject() or SHCreateShellFolderView(), or find a third-party solution that does the hard work of interacting with the Shell for you.
Someone know where can I add registry key for add some function to the right-click menu only when some text is selected?
Such as copy,paste,cut function
Thanks :)
As per the last comment by #zionpi and the specification by #Math1000 stating "Specifically looking to convert LaTex to plain text", I am assuming that the OP is looking to add an option in the context menu for all strings(or text) displayed(or presented) by all and any applications running in the system, which allows the user to, as per the original question, open that particular selected string in explorer if it is a valid path in the system or, as per the added specification, convert that particular selected string to plain text if it is a valid LaTex code (by copying the converted LaTex code to clipboard, perhaps?).
While the validation of the selected text (to check whether it is a valid directory or LaTex code) and implementation of the operation succeeding the validation can be feasibly implemented without any difficulty, the context menu option requiring to be available for "ALL" texts displayed by "ALL" applications in the system is impossible to implement. This is because there is no way to alter the context menus of individual 3rd party applications as their context menus are regulated and controlled by the application itself by the nature of their source code during development and would require APIs released by the concerned application developers themselves to facilitate this demand.
One infamous application that allows the implementation of such behaviors is Office, for which you can build add-ons to customize certain aspects of the application (whose tutorials can be found here and here (for .NET interoperability)) to implement said requirements.
While irrelevant to the original requirement, it is worth looking into the shortcut menu handlers of the shell extension development process here as it is a better and a much more elegant way of adding/implementing right-click context menus in comparison to the way mentioned in the OP's question i.e. by editing the registry.
We've got several web-based applications that are launched from our ERP system (SAP R/3 in this case, but since we're using ShellExec, I don't consider this a SAP issue). The problem is that we can either set the IE to "open every URL passed from the ERP system in a new window" or to "reuse any one of the existing IE windows" (same problem with tabs). Both settings are not acceptable for our users: one of the web applications is a rather bulky medical image viewer applet that wreaks havoc if invoked multiple times. The other option is a no-go either because this way opening the image browser for a patient automatically displaces the lab result display for the very same patient and vice versa.
I'd like to have some control over which window may or may not be reused. My idea would be a kind of "window tag" and a helper program that checks if a window with that tag exists - if it does, reuse it, if not create it. So basically
IELauncher SEARCH http://www.google.com
would open a new window and tag it as SEARCH.
IELauncher DEVEL http://stackoverflow.com
would open a second window, tagging it as DEVEL. Then
IELauncher SEARCH http://www.wikipedia.org
would replace the contents of the first (google) window only.
Is this possible at all? Do you have any pointers for me where to start? I don't even know what to look for...
I had to resort to some rather ugly methods - dynamically assembling a HTML page that uses JavaScript and window.open() to open and access a window by name, then close the page executing the JavaScript. Ugly, but at least this way you get the additional benefit of being able to control certain aspects of the browser window like switching of the menu bar, toolbar and location bar.