In AS400,is it possible to have a drop down menu within a display file "RECORD" type record format.
I have created a menu that is written in CL program and invokes the respective
RPG programs for each option selected.
But for one of the options i would further like to open up a menu,a sub menu rather on the same screen(like a drop down).I am aware of a record type of drop down in display...but how do i invoke that through CL i am unsure.
Please help folks.
One displays the window record format the same way one displays the main record format. SNDRCVF (or with a SNDF followed by a RCVF). CL doesn't allow for subfiles, but aside from that, there isn't any special technique to work with a window record format in CL. I know that this sounds very theoretical, but it is the best that I can do without seeing the code you tried.
0000.01 WELCOMEQQ,1
0000.10 0001 WRKMBRPDM
0000.11 0002 GO MENU(GIRRAJ111/MENU#1)
0000.12 0003 GO MENU(QGPL/GUEST)
0000.13 0004 GO MENU(QGPL/GUEST)
0000.14 0011 signoff
here welcomeqq is my first menu
and here MENU#1,GUEST these my secondary Menu which is the optin of first menu
{ Finally you should use "GO MENU(library name/menu name)" this command behind ur opt.}
Since this needs to be implemented using CL, one possible option you can try, is using indicators and switching the option line on/off accordingly which will be in the same record.
Well there can be a hidden flaw, all options are always on (unless you declare the fields with particular values you want to receive), just that it is hidden (if the user type a hidden option that too gets triggered)
Related
I want to display multiple SubVIs (each one has a set frontpanel with controls and indicators) in my main VI. The problem is: usually only 2 or 3 are active at the same time, the rest are deactivated.
Let's say I got an array of VI references for the active SubVIs. Is it possible to display the SubVIs in a table, where each SubVI gets its own row?
I'm basically looking for a container similar to a Tab Control, but instead of tabs I want to display the VIs row-wise.
Thanks in advance.
The best choice for you is sub panels. http://digital.ni.com/public.nsf/allkb/D587067E18E0E70186256D44007B91FE
Example:
https://decibel.ni.com/content/docs/DOC-18164
Also there is nice way with xcontrols, but it is complicated and takes more time to implement. Anyway below is link about xcontrols:
http://www.ni.com/tutorial/3198/en/
I was unable to place a Sub Panel (which shows a VI's front panel) in an array control, but I was able to place it and its VI reference in a cluster, and then place that in an array:
After that, you could set the VI Ref's visibility to hidden, and tweak the array's chrome. Going further, I don't know if LabVIEW provides a way to give that subpanel a VI reference when it's in a container, so your mileage may vary.
I am writing a few tests in vbscript for an application that I am working on, and I need to select one option out of several in a combo box. Does anyone know how to do this? The way I am currently "selecting" the option is
Browser("main_browser").Page("main_page").WebEdit("teams").Set "Thunder"
This will make this field equal to "Thunder", but the application does not recognize this as the "Thunder" choice in my combobox, merely a string with the value "Thunder" that has been injected, so to speak.
By the way, I am using quick test pro as an environment.
Are you sure the combo box is a real combo box (a SELECT HTML tag)?
When QTP sees a select tag it identifies it as a WebList and not as a WebEdit as you listed. Then you can perform WebList.Select which does a native selection (and not Set). It could be that you don't have a read HTML combo-box, instead you have an edit-box that simulates a combo-box and then .Set just sets the text.
If you are unable to recognise the control as a WebEdit you will have to examine the HTML to see what event causes the selection of the field to change and use WebEdit.FireEvent in order to simulate a human's interaction.
When you press F2 to edit a filename in Windows Shell, there is a limited set of editing keys that is understood - e.g. CTRL+Arrow Keys, Home, End, CTRL+X. For example, when you type CTRL+Right Arrow, the cursor will stop right after a dash, but will not stop at a period. Are these actions customizable, and if so, how?
Any additional information not directly related but which you feel might help the topic will also be appreciated.
You can set a custom word-break procedure for your edit control using EM_SETWORDBREAKPROC; EditWordBreakProc is the corresponding callback function that the OS calls when it needs to find where a word break occurs.
From the docs:
Either a multiline or a single-line edit control might call this function when the user presses arrow keys in combination with the CTRL key to move the caret to the next word or previous word.
The key combinations themselves are not directly customizable, and for a good reason -- so that the user experience is uniform across all applications. Of course, you could subclass the edit control and handle keyboard messages yourself but I guess that's not the point here.
The Windows version matters, but in general this behavior is baked into SysListView32, the native list view control. No, keyboard handling is hard-baked. Subclassing the control is technically possible, just not practical since it lives inside Explorer.exe. And having no clue where the caret is located inside the label, there are no messages for it.
By "Windows Shell" I assume you mean Windows Explorer, but the answer is likely the same no matter what program you are talking about.
Explorer simply creates an EDIT control and moves it into position. The editing behavior comes from this stock system control, plus whatever additional logic Explorer adds to its own instance of it.
While you can easily alter the behavior of an EDIT control that belongs to a thread in your own process, doing so in another process requires a global hook. We will stipulate that you understand the amount of work involved in doing a global hook correctly, and which will function in both x86 and x64 environments.
You cannot directly interfere with the behavior of an EDIT control in another process with WH_CALLWNDPROC, but you can use WH_CALLWNDPROCRET to observe keyboard messages, check that the window is and EDIT control, check that the EDIT control belongs to Explorer, and then knowing precicesly how the EDIT control responded to that keyboard event, do something additional like backing up to that period.
Or maybe you could use a WH_CBT hook to monitor HCBT_CREATEWND and subclass the EDIT control each time it gets created.
The effort is probably not worth the benefit.
I have a CListCtrl control that has 2 columns and any number of rows. I want the user to be able to click(or maybe double-click) a "cell" and be able edit the text therein.
What I mean is that I want to be able to click and edit any of the places where it says "TEST" by clicking on the text to make it editable.
How should I go about this? I suppose I should use a mouse click event but how would I make the cell editable?
This looks like a list control in report mode, which is different from a list box. A list box doesn't support editing contents at all. You can write code entirely on your own to get the contents of a line, copy that to an edit control, display the edit control exactly where the existing content was shown, allow the user to edit, and copy data back when/if the user hits return.
A list control allows editing of one (and only one) field. If you want to support more, you have a couple of choices. One would be about like above, creating your own edit control in the right place. The obvious alternative would be to look up one of the many grid controls. CodeProject has a number of variations.
I have a dialog that includes file selection and it has a "Browse..." button. But it seems like it would be a good idea to provide some kind of drop target so that the user can use his/her favorite file browser to select a file (or files) and drag it onto my application.
Is there any standard practice for what to use as a drop target?
Is it a file icon of some sort? what would that look like?
I tend to think that drop targets should be where the file "should land". That is, if I had a browse button and file path editbox, I'd make the path box the target. If I made a document editing application, I'd make the entire editing area the drop target (unless that would make an embedded object of course ... :-P who said these things are easy?)
So I'd say it depends on the application. But having a dedicated, separate target with no other purpose than to drop things on may not be the best solution, since it unneccessarily clutters the interface even for people who will never be interested in using the feature.
In Safari (on the Mac, at least), a file-chooser form element (Consisting of a "Choose..." button and a field showing the chosen file's name) is also a drag-and-drop target. (Contrast with Firefox, which treats the whole window as a drag-and-drop target, and will replace the current page with the dropped item.)
Other places, I've seen an inset box, sometimes with a centered, grayed-out "Drag items here" text which disappears if anything is dragged in.
As Ruddy said, I don't recall any standard icon for the drop idea. There is one for the no drop as shown in this image
(source: west-wind.com)
Otherwise I tend to like this kind of drop explanation; I find them pretty explicit.
Usually if a window accepts files for drag'n'drop - it just accepts them anywhere in the window.
If you have a list of files (listbox/view) or an just an text box that accepts a single file, those individual control windows could be the drop target rather than the entire window.
Normally there is no visual indication that a window accepts file drops. The only indication would be that you try it and you don't get the no-drop cursor when you drag across the window.
(Note: this is under MS Windows, other os window systems may have different standards)