Hello,
I'm working on a windows application with C#, I reorganized a screen using the TabControl with 3 TabPages.
Here's my problem, when I want to do something (printing, reading, etc) with a control in any TabPage that has not been opened (clicked on), I got nothing, the controls at this point have not been created, not until I click (manually or programatically) on the TabPage. Right now I have it working going through all tabpages programatically then back to the one that was open originally, but you can see the tabs changing, and this is kind of annoying.
How can I use the controls in the whole screen without having to open the tabs one by one?.
The controls are data binded by the way.
Hope you can help me with this one.
Thanks.
3 2475
Instead of dragging your controls onto your page, declare them in your C# code.
In your Page Load control make sure you place the controls into the appropriate tabs and also make sure that these controls are properly instantiated.
When you call your print function, use the controls that you've declared in your C# code to create your report (they should already be loaded by this point).
-Frinny
Instead of dragging your controls onto your page, declare them in your C# code.
In your Page Load control make sure you place the controls into the appropriate tabs and also make sure that these controls are properly instantiated.
Hey,
Is there any major difference when doing this? I always believed that controls were created when the InitializeComponent function was called, is this correct?
If so, doesn't that mean that the controls are created before OnLoad?
Sorry if this is crazy talk, but i always thought that it worked like this...
Hey,
Is there any major difference when doing this? I always believed that controls were created when the InitializeComponent function was called, is this correct?
If so, doesn't that mean that the controls are created before OnLoad?
Sorry if this is crazy talk, but i always thought that it worked like this...
You're right cloud.
I only made the suggestion because the OP is having problems with accessing data in their controls.
-Frinny
Sign in to post your reply or Sign up for a free account.
Similar topics
by: touf |
last post by:
Hi,
I've a tabcontrol that contains many similar tabpages (exactly the same
structure with different information), the tabpages number isn't known in
the design time it depends of the data.
Is...
|
by: Luc |
last post by:
Hi,
I have a TabControl and, at runtime, I need to add some tabpages. The
problem is that each tabpage is similar to the others and contains several
controls.
If I do...
|
by: VJ |
last post by:
I am looking to have 2 Tab Controls on a Windows Forms.. One with Tabs on
Top and another with Tabs on the side... I want them both to occupy the
entire area of the form, but I need the Tab...
|
by: userblue |
last post by:
Hi
Does anyone know if there is a way to define what is effectively a
single globally visible, enumerated list whilst actually defining the
entries across several different modules?
or somehow do...
|
by: veerleverbr |
last post by:
Hi,
I want to create an asp.net page with a tabpage. On the tabpage I want
to use the WebDateChooser and WebDataInput controls of Infragistics.
These 2 controls use a mask to enter a date and...
|
by: RichG |
last post by:
With the help of Cor Ligthert in a pryor post I was able to make this
sub:
Public Sub disableControls(ByVal frm As Form)
'this is to create a read only form that has active buttons
Dim x As...
|
by: Ryan |
last post by:
Ok.. I have a form with lots of stuff on it; a tool strip panel, menu strip,
data binding elements (dataset, binding source, table adapter), tab control
with 7 tab pages, each page contains a...
|
by: =?Utf-8?B?U2hhcm9u?= |
last post by:
Hello gurus,
I want to have a Form with a TabControl, this TabControl will contain
TabPage that has controls in it, this TabPage is prepared at design time.
I want in runtime to duplicate the...
|
by: Shinobi |
last post by:
i have a tabcotrol(dotnetmagic) in c#.net and i am trying to create a tabpage containing a
richtextbox which is created at runtime.
richtextbox rch=new richtextbox();...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
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...
| |