Jump to content

To tab or not to tab

- - - - -

  • Please log in to reply
2 replies to this topic

#1
zeroradius

zeroradius

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,406 posts
Edit: I'm just going to have it hide the tab controls , show the new one, and then run the queries on button press. I would still like this question answered thou.


I'm working on a medical records application that has about 6 categories. Each category will have a tab control with three tabs (view files, add file, and edit file). There are two ways I have thought about setting it up for the various categories.

1) Use child forms. This is clunky and rather hard for the user. 2) create a new class that is an extension of the tab control and make the tabs appear as the picture buttons i have made.

The ladder is what I would prefer as it would give a nice clean easy to use GUI . I don't know too much about the tab control however and when I google it all I find is pages on how to use the tab control. My question is if I use tabs does it run all the SQL queries on load of the program or do they run on load of the tab? Speed is important to the person that will be using it. Thoughts?
Posted Image

#2
Momerath

Momerath

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 242 posts
It runs the queries where you tell it to run the queries. If you put them in the form load event, they run when the form loads. If you put them in the tab control load event, they run there. Your solution to your problem seems to show that you understand when code runs so I don't know why this is a question for you at all?

#3
zeroradius

zeroradius

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,406 posts
I assumed it did but I haven't really used the tab control and my assumptions tend to be wrong. It's safer to look into it first. Thanks for the reply. +rep
Posted Image




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users