"Key Down" event use in one page of tab control prevents using "Value Change" events on another page, even though separate case structure blocks handle the two
The attached VI has a tabbed control with two pages. On one page, titled "Using Value Change Events", there is a control and an indicator, and the underlying code processes a Value Change event on that control by adding one to the number and displaying it on the indicator. On the other page, titled "Using Key Down Events", there is an indicator, and the underlying code processes a Key Down event by displaying the scancode on the indicator. Both these underlying code blocks are in different cases of a case structure chosen by the tab control. Some extra items are necessary to be able to stop those blocks from cycling if the tab is switched or the End VI button pressed.
Or, at least, that's what I wanted.
What actually happens agrees with the above, if the Increment/Decrement is used to change the value in the control on the Value Change page. But everything stops responding if I type in the control to change the number.
I think the problem involves the Key Down event structure, which is in what should be an inactive case of the case structure when this problem occurs. If I put a Disable structure around that Key Down event structure, the Value Change page items all work fine. Of course, the Key Down page items don't do anything with the Disable in place.
Why does having a Key Down event handler in an inactive case structure make a difference? How can I use both event types on dif...Change values of Tabs on Tab Control
I have a LabVIEW application where it is possible to change the language on the front panel, in connection with this I want to change the names/labels of the Tabs on a Tab Control.
Is this possible?
yes it is possible. See the attachment.
Awesome all... got what i needed.
...Which control caused cluster value change event ?
Is there a way to determine which control in a cluster caused the cluster's <All Elements> value change event to fire ? I have a cluster with several (5 to 10) numeric (and possibly some boolean) controls. I need to perform a slightly different action when each individual control's value changes. Therefore I need to know which control actually caused the cluster's value change event to occur. Separate events for each control's value change could be used instead but is there a way to only have one event for the overall cluster value change and then perform the individual action within that one event ?
...Numeric Control does not generate Value Changed Event on Return
I seem to have changed something on my LabVeiw 8.5.1 front panel which has stopped all of my Numeric Controls generating Value Changed Events when the Return or Enter key is pressed. The Value Change Event only fires if you TAB from the control or mouse click somewhere else.
Can someone please tell me how to get the normal functionality back!
Did you have specific key navigation configured for the control(s)?
No key navigation defined for any controls
you need to define a key navigation for the enter key.
Ray, I just put together a little test VI and it generates Value Changed events on a Numeric control upon hitting Enter with no key navigation set.toad,Is it possible that your control was changed to an indicator?
On a numeric control, yes :) Try it using a string control ;)
Do you have a filtering event for the enter key. For example placing the following code in a while loop would do what you observe.
JoeLabView wrote:On a numeric control, yes :) Try it using a string control ;)
... unless the string control is set to "limit to single line". :DMessage Edited by altenbach on 07-12-2008 11:08 AM
I...value change using DataSocket can't create value change event on remote computer?
I am trying to create an event on the remote computer:
Change a value in remote computer by DataSocket.
create a event: when the value changes.
I can see the value change on the remote computer; however, the value change doesn't cause the "value change event".
Anyone tried this before? Thanks.
Event Structure monitors a specified event based on user interaction on the front-panel objects. However, it does not monitor event generated programmatically like a change in the DataSocket data value. In order to generate a value change event with the DataSocket, you will need to use the "value (signaling)" property node for the DataSocket data or control. This property node sets the value of the control and also generates a Value Change event.
To create the property node, simply right click the control and select "Create>>Property Node>> Value (Signaling)". You can then wire the output from the DataSocket read to this property.
You can also checkout this <a href="http://digital.ni.com/public.nsf/websearch/024828947672E68586256ADB0071FB1B?OpenDocument" target="_blank">knowledgebase</a> entry for additional information.
Value (Signaling) is available in 7.1. In fact, it was introduced in version 7.0.
<img> Message Edited by Dennis Knutson on 12-15-2006 01...labview 7.1 Events read previous value of control
I am experiment with labview events. I have button that once its value
is change (ie clicked) it would fire an event to do an I2C write to a
The data to be rewriten is in a numeric control. Labview however
writes the previous value in the numeric control rather than the
I've verified this via scope on the I2C signals. Also i've used
probes and break points in labview to see what is going on and it does
confirm that old value is being rewriten. To make things more
interesting it seems the right values are brought to edge of the event
box however the previous value is passed on to the even handler!
I'm using labview 7.1
You would need to post your vi before I can tell for sure but it
sounds like a typical problem that a lot of people have in Labview; it
appears that your program is a cycle behind. Almost always, this is
because you have wired the value before the update occurs. Look
critically at the time you read the numeric control, not when you
write its value. In your case, you should read the value in the event
sequence, don't just wire it into the event sequence from the outside.
It that doesn't fix the problem, try positing the vi or at least a jpg
of the pertinent block diagram.
On 4 Nov 2005 16:12:01 -0800, firstname.lastname@example.org wrote:
>I am experiment with labview events. I have button that once its value
>is change (ie clicked) it would fire an event ...How to manage tab control using event structure to send values sequentially
Hello. I have a problem to make a program using tab control.
As I wrote on title, I am trying to use event structure under tab control in LabVIEW 8.2.
Once a numeric value is set, the value should appear and changed in next tab pages after clicking "next" button.
When "previous" button is clicked, the tab pages go to previous pages. Here, I have a problem.
Since I used shift register in while loop, the previous values should not be changed after clicking "previous" buttons, but they change.
I wonder how to keep the previous values remaining.
...Tab control in one of the tabs of another tab control
One of my colleagues is working with a tab control. He has several tabs. He is trying to embed another tab control inside one of the tabs of the first tab control. He had placed the second tab control inside one of the tabs of the first tab control. But the problem is that the second tab control does not show up (unless one goes to the block diagram and double clicks the second tab control, only then does it shows up; when the vi is closed and reopened its again not there). I told him that I had never seen such functionality (a tab control inside another tab control) in any application but is it somehow possible. All this is required while the VI is not running and is being developed (of course it should work at run time, but this functionality must show while the VI is not running, i.e., this functionality should be non-programmatic. Is it possible. Thanks for your time.
Hi rashid, yes it is possible. See the attached example. I see no problems with it.Hope it helps.Mike
Thanks <a href="../view_profile?user.id=88992" class="auth_text" style="font-weight: bold;" target="_blank"> MikeS81</a>! Yes you are absolutely right. Your VI is working perfectly. I wonder what has my friend done to get such behaviour as he is getting. Strange! Thanks for the help!Have a very nice day!
Hi rashid, can you upload your vi, maybe someone found the proble...PDA build error when using a 'value change' event on two controls
I get a build error when I use a 'value change' event on controls of a different type or even a different numeric representation. I'm using LV 7.1 PDA with no other modules installed. Attached is a picture of the entire code and the error message.
...How to control the tab control using event structure?
I am using tab control and event structure in the program.
When i run the application event is not happening for the active page.
When user switches from active page to the other page then event is taking place for all pages
So, how to get the event trigger for the active page when the application is started
For more clarification i am attaching the code "Test Control Tab using Event Structure.vi"
Test Control Tab using Event Structure.vi:
http://forums.ni.com/attachments/ni/170/288159/1/Test Control Tab using Event Structure.vi
You have a basic misunderstanding of dataflow. Maybe you should start with some tutorials or study some of the examples that ship with LabVIEW.
- The event structure belongs inside the while loop, and not vice versa. RIght now, the event structure only runs exactly once and never again.
- If the stop is pressed first, the VI will stop. Game over.
- If the tab control is changed (from any state to any other state!), the inner loop will spin forever as fast as the CPU allows, either executing one or the other case. It just reads the tab terminal to decide which case to execute. Changing tab never triggers any events. The VI is trapped inside the event until stop is pressed to stop the VI.
you were closer to a reasonable program in the other thread:
<a href="http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=287905"...How I can get "value change" event if I have a XControl with both indicators and control?
I'm using LV 8.5.1. My problem is followed: I have created a Xcontrol which is compound of few indicators and controls. On my code XControl act always as indicator and I read control values by using my own created properties. I need to launch a new event when user change some of the control values. At this moment event structure can't detect these changes. Is this a property or a bug ?
Hi BR, You should change your XControl on the owning VI into a control.Inside the XControl you can have both controls and indicators.This will give your user the possibility to change one of them.Note that you have to make additional event cases inside your XControl for those controls.Ton
Thanks for your hints. I made a small test and found quite strange behavior of my XControl. I added one ring, boolean, and enum control to my XControl (see attachment) and added "value change" events inside the XControl. I added "one button dialog" VI to those events to recognize if event is fired. When I change value of ring or enum (items 1,3,4) sometimes pop-up shows up and sometimes not but when I change value of boolean i...Controlling the 'On change' event for a numeric control.
I would like to be able to compare a control's new value with its old value,
whenever it is changed by a user.
The control holds a numeric value, qty_Sold, when this value changes I need
to check its validity and apply appropriate actions.
I have tried to do this using the control's 'On Change' event, and the
properties '.Value' and '.Text' to return the control's old and new values.
Unfortunately this event triggers on each character entered.
to change an old value of 1 to a new value 234 would trigger the code
behind the event three times:
changing the “1” to a “2” - code triggered;
user must now re-enter control, position cursor to right of the “2” and
enter “3” - this triggers code;
user must now re-enter control, position cursor to right of the “3” and
enter “4” - this triggers code, for the final (and only required) time.
Clearly this isn't acceptable to the user, so how do I achieve the required
comparison only when the user has completed their change?
I don't know if this effects anything, but the control is in a datasheet sub-
Message posted via AccessMonster.com
"SimonG via AccessMonster.com" <u41095@uwe> wrote in message
> I would like to be able to compare a control's new value with its old
> whenever it is changed b...Tab Events of Access Application ? (NOT Access Tab Control)
I'm trying to use the event when a person moves to a different form by
clicking on the built in Access application tabs.
Is there something I can reference or does it require some kind of
subclassing/hook api calls?
On Jul 21, 9:47=A0pm, "christianlo...@yahoo.com"
> I'm trying to use the event when a person moves to a different form by
> clicking on the built in Access application tabs.
> Is there something I can reference or does it require some kind of
> subclassing/hook api calls?
You can use the OnDeactivate event.
> You can use the OnDeactivate event.
Aha. Now I am forced to make an event for each form. Trying to
automate what tab the ribbon moves to based on the access application
Access could use a rewrite of it's event system imho. There are no top
level application events to tap into, no 'after delete' event, record
saves w/ a 'dirty=true', it's all quite ridiculous.
I was hoping the new table events would be the solution but they come
up w/ this 'data macro' crap where there doesn't seem to be any way to
call your own code on the event.
Sometimes I wonder if the ms developers ever use Access.
However, I love the report and form design improvements.
<email@example.com> wrote in message
news:firstname.lastname@example.org...Why do event structures trigger duplicate events for value changed, sometimes?
In this simple VI, an event structure is used to trap a value change within a color array.
However, when you run the VI and change a color, it triggers the event structure twice. The second time the structure executes under the value change event, an impossible state exists where the structure is executing as if oldVal<>newVal, but they are in fact, equal.
I have had to write around this many times. Why?
I agree this behavior is wrong. Looks like a bug that is unique to colorbox constants. It does not happen if you replace them with numerics.
This has been filed under CAR ID: 42FC9DIQ.
"This was reported to R&D (42FC9DIQ CAR ID) for further investigation. Thanks for the feedback!"
...Long pull down menu of tab control. References to controls on page of tab control.
two questions regarding a tab control:
I am using a tab control for offering the user various sub menus. The tabs are switched invisible. Instead I am using the page labels display for control of the tab. The list of available sub-menus (tabs) has already become quite long so that a pull down menu with a scrollbar appears (See attached screenshot). However, the scrollbar is not very convenient and not actually needed. Does anyone know how I could avoid this scrollbar?
I would like to get all the references of all controls of one particular page of that tab. I played around with the property nodes but could not yet find a solution. Any hint would be helpful.
Thanks in advance,
thanks for your advice. Unfortunately I am not yet finished.
1) I cannot find any item "scroll bar off" in the list of the properties of the menu ring.
2) Please, have a look into the attached vi "tab_control_page_1_release.vi". How can I get access to the references of the tab control pages inside the condition inside the for loop?I want to write a sub vi which releases the tab control in the calling vi from the disabled state.
thanks for your fas...tab control inside another tab control
Is it possible to put a tab control inside another tab control. I tried
it several times, but for some reason this doesn't seem to work.
Can someone confirm this, or tell me what the trick is.
The only way I know to do this is to put a subform on the first tab control.
Then you can put your second tab control on the subform.
If you do this repeatedly, however, you will find the form loading rather
"Georges Heinesch" <email@example.com> wrote in message
> Is it possible to put a tab control inside another tab control. I tried
> it several times, but for some reason this doesn't seem to work.
> Can someone confirm this, or tell me what the trick is.
> > Is it possible to put a tab control inside another tab control. I tried
> > it several times, but for some reason this doesn't seem to work.
I don't recommend using nested tab controls for usability reasons. If
you need to put a lot of information on one form, just use a whole lot
of tab pages. If all the information doesn't fit inside tabs on a tab
control on a 800x600-fitting form, then you need to figure out how to
split the form up into many forms.
For mega-sized forms, if you absolutely must, you can do what a lot of
software vendors do for their "Options" dialog boxes--you can put a
listbox with a...Will "Value change" events fire when changed via ActiveX?
I have a VI with an Event Structure defining several Value Changed
events. These events are associated with various buttons on the
control panel. When I work through the panel and press the buttons,
the events fire correctly. However, if I connect via the COM/ActiveX
control and change the control values, the button indicator light
changes, but the Value Change event does not fire. Can we trigger
value changed events remotely or must they be triggered via a
mouse-click on the button?
Please take a look at the document below. It explains why the events
are not being fired.
Structure Does Not Capture the Value Changed Event for Indicator Wired
to Iteration Terminal</a>
I hope this helps.
...Tab control within another tab control
I am creating a form with a tab control containing 10 tabs. and what I
want to do is on only on of the tabs, I want a sub section of tabs.
So what it ends up being is one main tab control with another tab
control embedded into only one of the tab pages. The problem I am
getting is when I insert the sub section tab control into one of the
tabs from the main tab control, the sub section tab control appears in
every tab in the main tab control. Can anyone help? What do I need
to do so it only appears in one tab, not all.
As you found, you cannot place a tab control on one of the pages of another
However, you can place a subform on a tab control page, and the subform can
have its own tab control.
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Paul Mendez" <firstname.lastname@example.org> wrote in message
> I am creating a form with a tab control containing 10 tabs. and what I
> want to do is on only on of the tabs, I want a sub section of tabs.
> So what it ends up being is one main tab control with another tab
> control embedded into only one of the tab pages. The problem I am
> getting is when I insert the sub section tab control into one of the
> tabs from the main tab control, the sub section tab control appears in
> every tab in the main...Value Changed event
I have a button called =93My Test=94 and its =93Value Changed=94 event is
handled inside the Event Structure. I have to click the =93My Test=94
button to have the code executed.
Is that possible that I can simulate a button click so the button=92s
=93Value Changed=94 event handler gets executed automatically?
I need the vi to process three different operations at once
automatically that usually need to click on three different buttons.
There are 2 ways to fire a value change event.
1. Have a front panel action that changes the value. This is what you
are currently using I believe....Events on Tab control
In the Tab control there are five Tab events.
If I select the Tab, the part where text is written, the event will not be
The events will be activated in the lower part of the tab (under the tab
Is there a workaround to activate the event by selecting the tab text area?
Thanks for any help.
Simon van Beek
"S. van Beek" <S.v.Beek@HCCnet.nl> wrote in message
> Dear reader,
> In the Tab control there are five Tab events.
> If I select the Tab, the part where text is written, the event will not be
> The events will be activated in the lower part of the tab (under the tab
> Is there a workaround to activate the event by selecting the tab text area?
Use the Change event of the entire TabControl and then test the Value property
to determine which page was selected.
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
...Control/Indicator descriptions are not imported or checked from LabVIEW to NI RG when they are placed on Tab controls
I am currently testing Requirements Gateway. As it seems it does not find any controls placed on a tab control to see if it is covered or not.
Is there any reason not searching for controls placed on tab controls?
We have VIs iterating over complex Front Panel structures to find all controls. Maybe we can add this functionality to NI RG LabVIEW interface.
Is there anyone can help in this?
...Acc2K3: Changing value on form from another form doesn't fire change event?
I have a calendar form that updates a date field on the form from which
it was called. I have code in the OnChange event of the date field that
I would like performed whenever the date value in the field is changed,
including when changed by selecting a new date from the calendar form.
The calendar form works as expected - when I select a date the date is
placed in the date field of the calling form, but the OnChange event
isn't fired by this change.
I'm wondering if this is expected behaviour? In essence, when I open
the calendar form I create a control object and set it to the relevant
date field on the calling form. Once a new date has been selected on
the calendar, the date value is assigned to the control object.
I'm curious to know if this might be because when you instantiate an
object as a reference to a control the object doesn't inherit or
pass-through to the control's event model? I may be clutching at straws
with that one, I admit.
Any help, as always, will be appreciated.
"lost in thought"
> Hi All,
> I have a calendar form that updates a date field on the form from which
> it was called. I have code in the OnChange event of the date field that
> I would like performed whenever the date value in the field is changed,
> including when changed by selecting a new date from the calendar form.
> The ca...What is syntax for displaying a specific tab of a tab control upon an "on open" event of a form?
I'm starting to learn about the tab control.
How would I write an on open event procedure in VBA, that upon opening
of the form, a specific tab opens (say tab 1)?
The pages of a Tab Control are 0 based meaning the first TabPage is page 0.
Add this code to the open event to open to a specific page:
First Tab --- Me!NameOfTabControl.Value = 0
Second Tab --- Me!NameOfTabControl.Value = 1
Third Tab --- Me!NameOfTabControl.Value = 2
Your Resource For Help With Access, Excel And Word Applications
Over 1100 users have come to me from the newsgroups requesting help
<email@example.com> wrote in message
> I'm starting to learn about the tab control.
> How would I write an on open event procedure in VBA, that upon opening
> of the form, a specific tab opens (say tab 1)?
Yep Thats the syntax
Thanks a bunch
>First Tab --- Me!NameOfTabControl.Value = 0
>Second Tab --- Me!NameOfTabControl.Value = 1
>Third Tab --- Me!NameOfTabControl.Value = 2
...Can someone tell me how to capture an event or somehow take notice of user switching tabs on a tab control on a form?
Wish I could invoke a procedure when user switches
pages on a tab control on a form. Dunno how.
I have TabCtl127, a tab control on frmProspectEntryForm
The cotrol has 4 pages: Page128, Page129, Page130
and Page131 labeled Prospect, Vehicle, Lienholder and
Seller respectively. If my user is on the Prospect page and
I wanna perform some VBA gymnastics when he clicks
over to the Vehicle page - how do I do that?
Clicking any of the tab headers on xxxxxxxxxx with the
form opened in design view reveals 5 event properties
for each - including a click event property. But I cannot
even get a msgbox "You clicked the Lienholder" tab
to run in code assigned to that property with the form
opened in form view. I'm confused by this.
My apologies to the NG. A quick search revealed
this 11-year old solution...
Private Sub MyTabCtl_Change()
Dim tbc As Control, pge As Page
Dim currentIndex As Integer
Dim somePageIndex As Integer
' Return reference to tab control.
Set tbc = Me!MyTabCtl
' Return reference to currently selected page.
Set pge = tbc.Pages(tbc.Value)
'Do something when a particular page is selected:
If pge.Name = "MySecondPage" Then
'Or . . . do different things with each page selected:
' Return reference to currently selected page.
Set pge = tbc.Pages(tbc.Value)
currentIndex = pge.PageIndex
Select Case currentIndex
Case 0 : 'do something when the First Page is selecte...