2 Replies - 321 Views - Last Post: 07 February 2013 - 09:49 AM Rate Topic: -----

#1 deery5000  Icon User is offline

  • D.I.C Addict

Reputation: 78
  • View blog
  • Posts: 966
  • Joined: 09-May 09

Best appoach to showing new data on form

Posted 07 February 2013 - 09:10 AM

Hi Guys,

I have main form
http://i1106.photobu...zpsa33699a9.png

i want to add a "View all" option and display all the posters in that category on the main form.

How do i go about doing this?

My form is build up of panels and table layout controls, id prefer not to duplicate the form and have that millisecond flick between forms.

Ive tried hiding and showing panels before and it become messy down the line when making changes.

any advice would be great.

Kevin

Is This A Good Question/Topic? 0
  • +

Replies To: Best appoach to showing new data on form

#2 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5480
  • View blog
  • Posts: 11,762
  • Joined: 02-June 10

Re: Best appoach to showing new data on form

Posted 07 February 2013 - 09:28 AM

Add controls programmatically.

We know nothing of your program, code, objects or how you have this organized. But I assume you have a class for Movie, and a List<Movie> that is the collection of movies. Or something similar. So this is the basic logic I would explore:

foreach(Movie m in MyMovieList)
{
    movieDisplayPanel.Clear();

    if (m.category == SelectedCategory)
    {
       // make new movieUserControl
       // add control to panel
    }
}

Was This Post Helpful? 0
  • +
  • -

#3 deery5000  Icon User is offline

  • D.I.C Addict

Reputation: 78
  • View blog
  • Posts: 966
  • Joined: 09-May 09

Re: Best appoach to showing new data on form

Posted 07 February 2013 - 09:49 AM

Thank you for the response.

I think i new this was the best option but was wondering if there was a more simplistic method. :(

I have programmatically created controls in the past with picture controls on a panel so i know how to get started.

Does the movieDisplayPanel.Clear()method remove the controls entirely from the panel meaning id have to recreate them when the user wishes to navigate back to the main page.

Are they disposed correctly as i have images also?

does the .Clear() method destroy the controls?

i would have to create the controls manually when the user navigates back to the main screen yes?

If so then i just be best to create the controls manually from the beginning and scrap the ones i have in the designer.

does the .Clear() method destroy the controls?

i would have to create the controls manually when the user navigates back to the main screen yes?

If so then i just be best to create the controls manually from the beginning and scrap the ones i have in the designer.

does the .Clear() method destroy the controls?

i would have to create the controls manually when the user navigates back to the main screen yes?

If so then i just be best to create the controls manually from the beginning and scrap the ones i have in the designer.

does the .Clear() method destroy the controls?

i would have to create the controls manually when the user navigates back to the main screen yes?

If so then i just be best to create the controls manually from the beginning and scrap the ones i have in the designer.

does the .Clear() method destroy the controls?

i would have to create the controls manually when the user navigates back to the main screen yes?

If so then i just be best to create the controls manually from the beginning and scrap the ones i have in the designer.

wow, happened there.

Got an internal server error.

comment duplicated many times. apologies for that
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1