473,406 Members | 2,312 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,406 software developers and data experts.

C# Panel Issue

384 256MB
I have a form called frmMain and it calls a function in DBQueries.cs, there is a panel created in the DBQueries class and i need to add it to a panel that already exists in the frmMain, i just can't figure out how to reference the panel in frmMain??

panRecentList is the panel on frmMain and this code is in DBQueries, how do i reference the last like of the code here??
Expand|Select|Wrap|Line Numbers
  1. Label error = new label();
  2. error.Text = "Unable to retrieve recent list.";
  3. panRecentList.Controls.Add(error);
Jan 19 '09 #1
4 1499
Plater
7,872 Expert 4TB
Whatever function in dbqueries.cs that frmMain calls, have return a Panel object as its return parameter.
Jan 19 '09 #2
ziycon
384 256MB
Nice one, i got the panel being returned, next little thing is i have this code.
Expand|Select|Wrap|Line Numbers
  1. label.Text = "ERROR: Unable to retrieve recent list.";
  2. panel.Controls.Add(label);
But only 'ERROR: Unable' is being displayed on the panel? I have the panel width set to 659!??
Jan 20 '09 #3
Plater
7,872 Expert 4TB
When you created the Label object, did you set the Location and Size proeprties?
Jan 20 '09 #4
r035198x
13,262 8TB
What other controls are on that panel?
Jan 21 '09 #5

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

Similar topics

3
by: clintonG | last post by:
Please provide your article reference(s) that document how to use DNF 1.1 panel controls to build a Wizard. I've seen and tried out the DNF 2.0 Wizard Control, I don't like the current...
4
by: James | last post by:
Hello group: I'm trying to hide a panel control in javascript when a print button is clicked. On my web form, I have a button that fires a javascript function called doPrint(). No matter how I...
3
by: M O J O | last post by:
Hi, I have a panel on my form. I want to detect when the user enters my panel with his mouse and when he leaves my panel. If the user hovers a control inside my panel, I get the mouseleave,...
1
by: lodhaakhil85 | last post by:
Hi I'm a newbie to C# and GDI+.I am writing an application that will display some strings from a file on a panel. There are a few of problems I am facing : 1.How do make the panel re-adjust...
1
by: clintonG | last post by:
I'm having a problem maintaining state with a Panel control in a MasterPage and I need help thinking through this process. The basic structure of the HTML in the Master looks like this... ...
10
by: markwalker84 | last post by:
Hello everyone! Got a bit of a problem... Two of the panels on my program contain a number of check boxes. The exact number of which is determined by a pair of variables. I have recently...
8
by: =?Utf-8?B?R3JlZyBMYXJzZW4=?= | last post by:
I'm trying to figure out how to modify a panel (panel1) from a backgroundworker thread. But can't get the panel to show the new controls added by the backgroundwork task. Here is my code. In...
1
by: vvgopal2k | last post by:
Hi Group, I am facing a problem in ASP.net usercontrols. Here is the Program. When a Click a button on the usercontrol page, a panel shows up on the same user control, this panel has some...
1
by: sweatha | last post by:
I have designed the login form with 3 panels. In the first panel I have the login verification such as login id, password, login button and forgot password link button. In the second panel I have...
5
by: sklett | last post by:
I know that Panel (and most of it's derivitives) don't raise keyboard events. I *really* need to catch keyboard events though so I've been googling the topic and have found quite a few...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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
marktang
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,...
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
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...
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,...

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.