Click here to Skip to main content
14,870,204 members
Home / Discussions / Windows Forms
   

Windows Forms

 
AnswerRe: Folder Permissions - Urgent Help Please Pin
Nitzan Levi22-Aug-15 19:50
MemberNitzan Levi22-Aug-15 19:50 
QuestionAccordion in windows Forms Pin
sudevsu24-Apr-15 5:25
Membersudevsu24-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
Membersudevsu24-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
Membersudevsu24-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
Membersudevsu24-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
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
Membersudevsu30-Apr-15 7:48 
QuestionPRINT A DATAGRID WHITH VB.NET Pin
Member 1163064821-Apr-15 9:41
MemberMember 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
MemberMember 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
MemberiWonderHow7-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
MemberiWonderHow8-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
MemberiWonderHow8-Jun-15 22:24 
GeneralRe: Highlight text only in a listview subitem Pin
Brisingr Aerowing9-Jun-15 0:56
professionalBrisingr Aerowing9-Jun-15 0:56 
QuestionThe name does not exist in the current context Pin
Member 1148634727-Feb-15 15:53
MemberMember 1148634727-Feb-15 15:53 
AnswerRe: The name does not exist in the current context Pin
Richard MacCutchan27-Feb-15 22:26
mveRichard MacCutchan27-Feb-15 22:26 
AnswerRe: The name does not exist in the current context Pin
Afzaal Ahmad Zeeshan1-Apr-15 1:20
mveAfzaal Ahmad Zeeshan1-Apr-15 1:20 
QuestionJoystick Windows Forms User Control Pin
Abinonos15-Feb-15 9:37
MemberAbinonos15-Feb-15 9:37 
AnswerRe: Joystick Windows Forms User Control Pin
Gerry Schmitz1-Apr-15 0:39
mveGerry Schmitz1-Apr-15 0:39 

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.