Click here to Skip to main content
15,907,120 members
Home / Discussions / Windows Forms
   

Windows Forms

 
QuestionWhich function trigger to load next set of data when user scroll datagridview c# Pin
Tridip Bhattacharjee18-Jul-15 6:48
professionalTridip Bhattacharjee18-Jul-15 6:48 
AnswerRe: Which function trigger to load next set of data when user scroll datagridview c# Pin
Eddy Vluggen20-Jul-15 9:45
professionalEddy Vluggen20-Jul-15 9:45 
QuestionHow to Raise event before and after loading data to datagridview when virtual mode on Pin
Tridip Bhattacharjee18-Jul-15 6:47
professionalTridip Bhattacharjee18-Jul-15 6:47 
AnswerRe: How to Raise event before and after loading data to datagridview when virtual mode on Pin
Eddy Vluggen20-Jul-15 9:42
professionalEddy Vluggen20-Jul-15 9:42 
QuestionUse of Unicode characters -> Syntax. Pin
Mateo Hernández17-Jul-15 3:30
Mateo Hernández17-Jul-15 3:30 
AnswerRe: Use of Unicode characters -> Syntax. Pin
Richard MacCutchan17-Jul-15 3:33
mveRichard MacCutchan17-Jul-15 3:33 
GeneralRe: Use of Unicode characters -> Syntax. Pin
Mateo Hernández18-Jul-15 3:37
Mateo Hernández18-Jul-15 3:37 
QuestionWindows Form Shown Pin
Mateo Hernández12-Jul-15 12:58
Mateo Hernández12-Jul-15 12:58 
AnswerRe: Windows Form Shown Pin
erwinliong12-Jul-15 14:55
erwinliong12-Jul-15 14:55 
GeneralRe: Windows Form Shown Pin
Mateo Hernández12-Jul-15 20:45
Mateo Hernández12-Jul-15 20:45 
GeneralRe: Windows Form Shown Pin
Mateo Hernández12-Jul-15 23:11
Mateo Hernández12-Jul-15 23:11 
GeneralRe: Windows Form Shown Pin
Sascha Lefèvre13-Jul-15 4:20
professionalSascha Lefèvre13-Jul-15 4:20 
GeneralRe: Windows Form Shown Pin
Mateo Hernández17-Jul-15 3:14
Mateo Hernández17-Jul-15 3:14 
QuestionFolder Permissions - Urgent Help Please Pin
Seuss13-May-15 3:09
Seuss13-May-15 3:09 
AnswerRe: Folder Permissions - Urgent Help Please Pin
Dave Kreskowiak25-May-15 3:57
mveDave Kreskowiak25-May-15 3:57 
AnswerRe: Folder Permissions - Urgent Help Please Pin
Nitzan Levi22-Aug-15 19:50
Nitzan Levi22-Aug-15 19:50 
QuestionAccordion in windows Forms Pin
sudevsu24-Apr-15 5:25
sudevsu24-Apr-15 5:25 
AnswerRe: Accordion in windows Forms Pin
Richard MacCutchan24-Apr-15 7:01
mveRichard MacCutchan24-Apr-15 7:01 
GeneralRe: Accordion in windows Forms Pin
sudevsu24-Apr-15 7:29
sudevsu24-Apr-15 7:29 
QuestionRe: Accordion in windows Forms Pin
Eddy Vluggen24-Apr-15 7:28
professionalEddy Vluggen24-Apr-15 7:28 
AnswerRe: Accordion in windows Forms Pin
sudevsu24-Apr-15 7:32
sudevsu24-Apr-15 7:32 
GeneralRe: Accordion in windows Forms Pin
Eddy Vluggen24-Apr-15 7:38
professionalEddy Vluggen24-Apr-15 7:38 
GeneralRe: Accordion in windows Forms Pin
sudevsu24-Apr-15 7:59
sudevsu24-Apr-15 7:59 
OK let me put this again Clear. You must be knowing for Accordion in Web applications work.
I want a similar one in windows. I already did try. But If my panel has any other controls other than Label, it doesn't work. Could not figure it out how to achieve this with all the controls in the panel.
Here is the code that will act labels click as accordion
VB
Private Sub ButtonClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label2.Click, Label3.Click, Label5.Click
    'find out which label was clicked
    Dim lbl As Label = CType(sender, Label)
    'find the panel containing the label
    Dim pnl As Panel = lbl.Parent

    For Each p As Panel In TableLayoutPanel1.Controls
      Dim l As Label = CType(p.Controls(0), Label)
      If p.Equals(pnl) Then
        'expand or collapse the panel
        If p.Height = 150 Then
          p.Height = 25
          l.ForeColor = Color.Black
        Else
          p.Height = 150
          l.ForeColor = Color.Black
        End If

      Else
        p.Height = 25
        l.ForeColor = Color.Black
        l.Image = My.Resources.arrow
      End If
    Next
  End Sub

Your help is much appreciated.
Thanks
Happy Coding!

AnswerRe: Accordion in windows Forms Pin
Richard Deeming27-Apr-15 2:47
mveRichard Deeming27-Apr-15 2:47 
GeneralRe: Accordion in windows Forms Pin
sudevsu30-Apr-15 7:48
sudevsu30-Apr-15 7:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.