473,396 Members | 1,914 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

TabSet

OuTCasT
374 256MB
Hi all.

If i had a tabset with 6 tab pages on it and i have some fields to insert data on each of them. each tab page has got an add button on it. Would it be possible that when the clients clicks on the add button on one of the tabs.....that the client cannot leave that tab page until they have saved the work or that they have clicked cancel ???

making the other tabs disable and not be able to get focus until the client has saved the data that he is busy with ???
Aug 25 '08 #1
5 1084
cloud255
427 Expert 256MB
Hi there,

Well i found a work around, i'm pretty sure that someone else will have a better solution, but here goes, by the way this is done for a windows app:

I created a boolean to track if the tab pages must be 'locked' and a TabPage to keep track of the active page.

Then when you perform an action which requires tab locking, you set the boolean and the active TabPage.

Next in the selected indexChanged of the tab control i check if we are locking tabs, if so address the tab control and set the selected tab to the active tab.

Finally you need some sort of mechanism to set the locking variable to false (your cancel/save button).

It worked fine for me, but not very pretty...
Aug 25 '08 #2
OuTCasT
374 256MB
Hi there,

Well i found a work around, i'm pretty sure that someone else will have a better solution, but here goes, by the way this is done for a windows app:

I created a boolean to track if the tab pages must be 'locked' and a TabPage to keep track of the active page.

Then when you perform an action which requires tab locking, you set the boolean and the active TabPage.

Next in the selected indexChanged of the tab control i check if we are locking tabs, if so address the tab control and set the selected tab to the active tab.

Finally you need some sort of mechanism to set the locking variable to false (your cancel/save button).

It worked fine for me, but not very pretty...
Hi

Thanks i will try that.
I actually found a tab control that can be added to Visual Studio that has tab enabled/disabled feature.
so you can just say tabpage.enabled = false and it works perfectly.

I can give you the link if you like ?

--DK--
Aug 25 '08 #3
cloud255
427 Expert 256MB

I can give you the link if you like ?
Yeah that would be great :D
Aug 25 '08 #4
OuTCasT
374 256MB
Yeah that would be great :D
TabControlEX


Download the TabControlEX control and then add it too your toolbox and then you can drag it onto the form.
Aug 26 '08 #5
cloud255
427 Expert 256MB
Download the TabControlEX control and then add it too your toolbox and then you can drag it onto the form.
Wow, this a pretty cool control, sure makes life easier.
But it makes me wonder why MS didn't see the need for this, i mean we have been seeing disabled tabs since WIN 95 if i am not mistaken,

Anyway, thanks for the link :)
Aug 26 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Bob Bedford | last post by:
Hello, I've coded a tab pages somes years ago, with a search engine (with the help of an other programmer) allowing to search in many divs (any tab show/hide a div). Now, I've to change code...
3
by: rkhurana | last post by:
Hi I am writing a JSF application that uses some third party charts. While I can see the chart but the javascript that is supposed to calla function to update chart periodically has a problem. It...
2
by: PaulVS | last post by:
Hi all, I am a beginner with Javascript and i am trying to make a simple script to switch tabs with use of classes because im much better in styles. My javascript is: ]function...
3
chelvan
by: chelvan | last post by:
hi forums on my site all the pages ask refresh to load. its happened randomly. that means some time the page display its body some time its not. why? any one know the reason? thanks for u...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.