Go to Display Button Factorytalk View ME? - plc

I’m using Factor Talk View ME to program AB PanelView 1000 HMI and I can’t figure out how to program a button to activate “manual” mode and then goto a display directly after button is pushed. I can set them up individually with two separate buttons, but wasn’t sure if this can be done in one button?

You have 2 types of buttons:
For navigation
For setting values (in plc or HMI tags). for your activated "manual" mode I guess?
I don't think you can do both with one button in ME(in FT View SE you can), however a solution can be to use a macro:
1 Create a new "Logic and control" => macro
2 Set your value in order to activate your "manual" mode
4 Create your button in order to display your screen
5 On your displayed screen, go to display setting => behaviour
6 Add your freshly created macro in Macro > startup field.
Is it what you expect ?

Related

MS Access Form Development: Hide Objects when an Option Button is Pressed without coding for each Object that needs to be hidden

MS Access Development Question:
I have 3 options and I need each one associated with a different set of objects. Therefore, if you click option 1, a set of objects will appear in a box I'm referring to as "Report Parameters". If I click option 2, the objects in the "Report Parameters" box will disappear and a new set of objects will appear.
I didn't want to write code to switch each object from visible = true to visible = false. I thought that would take too long, especially if the number of option buttons or the objects related to it grow.
So I'm trying several things...
I tried putting all objects, that relate to a particular option, in a Subform. Therefore, I would have three subforms and that would sit in the same position on my main form. When you click on an option, the subform for that option is made visible any anything else is hidden. But I have a background picture that needs to be visible on the main form and you can't make the subform background transparent.
I used Tab Controls; however, I didn't want to use the tabs to control the switch between objects. I can hide the tabs but you can still switch between them if you click the space where the tab should be. It can be made transparent though so that helps a lot.
I need something in-between a Subform and Tab Control but I've hit a dead end. Does anyone have any other suggestions or recommendations? Or am I stuck coding for each object?
I'm an experienced VBA developer. My last option was to run a query against the form and pull all object names and save it to a table. Since the syntax of the name for each object connects it to a button, I can always run a loop that makes all objects visible/invisible if the object's name corresponds with a specific option... but... I guess I'm trying to find a shortcut. Let me know what you think! Thanks.
I was able to resolve my issue. I just needed to do some thinking... so writing up this question was a bit premature. I'll write down what I did in the event that someone has the same issue I have.
First, I used the Tab Control object to resolve my issue. I made the control transparent and named each page to reflect the Option Button I was selecting.
I then mapped each option to a button in the VBA code of the button. Therefore, when the button is selected it does several things.
First, it makes the default value of any of the other options equal to false. I also set the visibility of their corresponding pages to false.
Second, I select the page I need visible and set the visibility to true. I also make it my active page.
Lastly, as a safety measure, if the option button is already selected, and you select it again, by setting the value of that option to true. This is to prevent it from changing to false. One option should always be selected.
Hope that all made sense!

Access Menu sub form - No default Tab stop

I have a main form...imagine that...that for most of my users will be the only form they use. Naturally, it contains tabs with sub forms.
I have a navigation sub form on the left side of this form that changes based on the user's rights level. Currently, this sub form is all buttons...and 1 always is selected as the default tab stop for that form.
I don't want to highlight any of them at first...and I can remove the highlight by switching off Tab Stops for all buttons. However, I'm not sure that I want to remove that functionality all together...and it still highlights a button. I'd just like for there to not be a default button highlighted.
As you can see, Add Course is 'selected'. I can't seem to find the correct terminology to search for a way to do this. I tried using a smaller button set behind another button, but since it has the focus, it moves to the front. Using a text field with the same colors as the background shows the cursor in a random, blank area...not visually ideal.
I'm sure that there is someone here clever enough to have this figured out. Please enlighten me. I don't care if this can be handled in VBA code or through design view.
"Focus" is the word you're looking for - you don't want any visible control to have the focus when opening the form.
The easiest method is an invisible button: create a button with Transparent = True, and an empty OnClick (i.e. the button does nothing, even when accidentally clicked).
Move this button to the top in the Tab Order, so it has the focus when opening the form.
But if your users use TAB to walk through the buttons, there will be one position where the focus disappears (when circling around from the last to first control). I don't know if it will confuse them.
Create a button on the main form itself.
Named is cmdDummyButton with the following GotFocus event code.
Set the tab order property to 0 (ie first)
Make the button transparent.
This will cause no control on the form to have the focus when it starts up.
Private Sub cmdDummyButton_GotFocus()
Static IveHadFocusAlready As Boolean
If Not IveHadFocusAlready Then
Me.cmdDummyButton.Enabled = False
IveHadFocusAlready = True
End If
End Sub
Sweet.

How to force a delphi form to be in foreground in windows 10 tablet mode

This is the setting:
I have two views that are implemented within two different vcl forms. To one of those I applied a style to make it look like a touch optimized metro app.
Those forms can be switched according to an application's setting. (show touch optimized view on/off)
this works pretty good. I override Application.MainForm, the old form closes, the new form appears (and takes the focus).
I want this to be automated in Windows 10. As additional view mode I offer an option "Auto detect":
I am listening for the windows message WM_SETTINGCHANGE. This is sent by switching between desktop mode and tablet mode.
Then I check the registry for the value of HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ImmersiveShell\TabletMode
If it's 1 I switch to the touch optimized view.
And this is the problem:
The old form is destroyed, the new form pops up and Application.MainForm references the new form.
Buf afterwards also the start screen of the tablet mode pops up and shows itself on the very top of all windows.
So my new touch optimized form disappears behind this screen and loses the focus. This behavior doesn't appear if I set the view fixed to the desktop view and switch windows 10 into tablet mode. in this case, my application keeps the focus and maximizes itself (that way there's no form created of course).
What I've tried so far:
The most obvious approach would be a call of
Application.MainForm.BringToFront.This doesn't work.
My second approach was to create a hidden "helperform" that takes FormStyle := fsStayOnTop (this way the focus should be taken) and calls SetForeground(Application.MainForm.Handle) from WinAPI.
any ideas?

Predefined Add Dialog not working as expected in Lightswitch 2012

I've created a query to use in an AutoCompleteBox and it works as expected when the user select the AutoCompleteBox in the grid as shown in the picture below
However if the user click the plus button to add a new record using the predefined Add Dialog then the query and the AutoCompleteBox's format doesn't work as shown in the picture below
Why is this happening and how I can fix that?
Thanks
I haven't yet found a way to edit the default Add New dialog.
Instead, make a new screen, select the "New Data Screen" template, and link it to your entity data. You can customize the screen to fit your needs, even make it a Modal Window by changing the Control Type in the screen properties. Once you have the screen set up the way you want, go back to your grid screen, and double click on the Add... command in the Command Bar of your grid, to edit the AddAndEditNew_Execute code. In that method, call your custom screen.
So, as I got to thinking about this some more, I came back to the thought I had when I tried to do this a few months ago. There has to be a better way, so I Googled it again.
This time, I found something. He's using an old version of Lightswitch, but I've successfully applied his technique in my application built in Lightswitch 2012.
http://www.c-sharpcorner.com/UploadFile/051e29/modal-window-in-editable-grid-screen-in-lightswitch-2011/

Force Titanium (iPhone) navigation group window to refresh

I am developing a data-driven application for iPhone using Appceleartor Titanium engine.
To cut it short, I have one window with first_name variable (label) on it and a button.
You click on the button, it bring you to the second window (through navigation group). ANd in this second window you can change the first_name variable.
So the question is, as the user click "Back" Button to go back to the first window in the navigation group, how do I reflect the first_name variable change?
(The first_name variable is just an abstract, the actual data change is actually a lot bigger, and it usually is not one window after another but could drill down to 4, 5 different windows)
eventListener. add in the first window something like
window0.addEventListener('refreshLabel',function(e){
label.text = e.value;
});
and in the second window fire the event
button.addEventListener('click',function(e){
window0.fireEvent('refreshLabel',{value:"myNewContent"});
};
You can put an event listener on the label and fire an update when the contents should he changed.
You can create an update method for the label and place it in the gloval namespace making it available to he called from the othe window.