Click here to Skip to main content
15,885,985 members
Home / Discussions / Windows Forms
   

Windows Forms

 
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 
QuestionPRINT A DATAGRID WHITH VB.NET Pin
Member 1163064821-Apr-15 9:41
Member 1163064821-Apr-15 9:41 
AnswerRe: PRINT A DATAGRID WHITH VB.NET Pin
Eddy Vluggen21-Apr-15 10:04
professionalEddy Vluggen21-Apr-15 10:04 
GeneralRe: PRINT A DATAGRID WHITH VB.NET Pin
Member 1163064821-Apr-15 11:04
Member 1163064821-Apr-15 11:04 
GeneralRe: PRINT A DATAGRID WHITH VB.NET Pin
Eddy Vluggen21-Apr-15 11:27
professionalEddy Vluggen21-Apr-15 11:27 
QuestionHighlight text only in a listview subitem Pin
iWonderHow7-Apr-15 21:49
iWonderHow7-Apr-15 21:49 
AnswerRe: Highlight text only in a listview subitem Pin
Eddy Vluggen8-Apr-15 0:28
professionalEddy Vluggen8-Apr-15 0:28 
GeneralRe: Highlight text only in a listview subitem Pin
iWonderHow8-Apr-15 21:58
iWonderHow8-Apr-15 21:58 
AnswerRe: Highlight text only in a listview subitem Pin
Brisingr Aerowing8-Jun-15 16:29
professionalBrisingr Aerowing8-Jun-15 16:29 
GeneralRe: Highlight text only in a listview subitem Pin
iWonderHow8-Jun-15 22:24
iWonderHow8-Jun-15 22:24 

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.