Please See this:
http://img405.imageshack.us/img405/2008/rolloversummaryschedule.jpg
How can i create a window that holds Patient data in it? The 2 records that you see is in List View. I would then using ContextMenuStrip for text "View Details". When View Details is clicked i need to show the context. For web development this could be done via Javascript,div and panels. How that should be WinForms?
Please Help.
Thanks!
How about:
Make a form, formMaster, that displays the Schedule records in GridView
Upon double click on a row event, display another form, formDetail, passing on the selected patient id
Upon loading of the formDetail, get the patient record based upon that ID and set the controls accordingly.
Checkout:
Walkthrough: Creating a Master/Detail Form Using Two Windows Forms DataGridView Controls
How to: Create a Master/Detail Form Using Two Windows Forms DataGridView Controls
---EDIT--
You can use the GroupBox, or the Panel control itself. Usually, with WinForms GroupBox is more of a common use.
Grouping Controls with the Windows Forms Panel Control
Grouping Controls with the Windows Forms GroupBox Control
I take it you mean as a popup panel, like you would see using javascript such as overlib (http://www.bosrup.com/web/overlib/) - implementing this behaviour in winforms.
The way I have done this in the past is by having a user control which is an extended panel, and on the mouseenter event of the specific control I have shown the panel at the mouses's x,y coordinates, which are accessible from the event arguments in the handler.
Then on mouseleave you hide the usercontrol.
Related
I have created a form that shows data and the filter that has checkbox in it
combobox
I have used a Button and a Panel to do this and found that the panel is only shown in the parent's panel not float like the combobox
or panel can't do like this?
Regards
You want something that cannot be done with parented components (like panels)
I see some options:
(1) owner draw a combobox to include checkboxes, see Codeprojects https://www.codeproject.com/Articles/31105/A-ComboBox-with-a-CheckedListBox-as-a-Dropdown
or
(2) Create a small floating popup form without system menu and a single pixel border. Inside the form, you could place a CheckListBox docked Fill to allow for filter checkboxes for each item.. you may have a look at this topic Is there a simple way to implement a Checked Combobox in WinForms
(3) Both solutions have drawbacks. Actually it may be better to avoid it, find another way to specify your filter options, redesign your UI.
I am using c# drag and drop panels .the panels keep appearing and disappearing.Also i need help with panel box functionality words like "bring to front and bring to back" i think this is what is messing my panels up.What do they mean?
The Windows Forms Designer has a concept called Z-order. When two controls overlap, the Z-order determines which control will show up on top.
For example, suppose you have two controls called textBox1 and pictureBox1 on a Windows Form. Programatically, this refers to the Windows Form itself, Controls is the default list of controls in that Form, and textBox1 and is the actual control we are changing.
Selecting the menu option Bring to Front is equivalent to calling the control's BringToFront() method. This moves the control to the beginning of the default Controls collection of the Windows Form. So if you call Bring To Front on textBox1, it will show up above all other controls on your Form. Programatically,
// Bring the control in front of all other controls
this.textBox1.BringToFront();
Selecting the menu option Send to Back is equivalent to calling the control's SendToBack() method. This moves the control to the end of the default Controls collection of the Windows Form. So if you call Send To Back on textBox1, it will show up behind all other controls on your Form. Programatically,
// Send the control behind all other controls
this.textBox1.SendToBack();
You can also have finer control over the ordering programmatically. There is no way to do this in the UI. So:
// Put the control at the 2nd index in the Controls collection of this Form
this.Controls.SetChildIndex(this.textBox1, 2);
This page Layering Objects on Windows Forms gives some more details.
The page Windows Forms Controls: Z-order and Copying Collections has examples on how to control Z-order programmatically.
My scenario is:
I have Infragistics Tab Control and i put windows forms TableLayoutOutPanel inside it dyanamically.
So how to get TableLayoutOutPanel from Infragistics Tab Control??
Please Help.
When adding controls they are added to an UltraTabPageControl and this like any other Control has a Find method that allows you to find child controls by Name.
I am creating a Windows forms user control. This control has a textbox and a listbox.
When the end user types text in the textbox, the listbox will appear and filter the data
depending on the text box. The data is set by a datasource.
I have created this control because I want to filter in the contains of data "not start with."
Now after I create the control I found a problem when the list appear it did not appear out of form boundaries.
I change the control size in appear and disappear the listbox. What can I do?
You can not show a ListBox out of the boundaries of its parent Form. What you really wan to do is open a new Form where ListBox is visible.
Hope this helps.
I have a user control that consists of some textboxes and checkboxes. Once the user is finished filling the first one, they should be able to add one more form by clicking an "add another record" link button.
How can I repeat this usercontrol as the user clicks?
I am supposed to use C# only.
So, we are talking of UserControl where your fields are located (I mean, that this is a one class inherited from UserControl or Control. )
There are a lot of ways to do it. But, I think, to be mode 'code concise' is to use FlowLayoutPanel
a) Create this panel. (through visual designer i.e.)
b) When user clicks, create your control
c) add your control to layout panel.
var myControl = new MyControlWithForm();
flowLayoutPanel1.Controls.Add(myControl);
One could use flowLayoutPanel1.Controls array to process all filled forms afterwards.