开发者

How to create panel like windows in WinForms

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 J开发者_运维百科avascript,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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜