Can something like this be done?
Say I have two buttons a Prepare and Calculate button.
when the user hits Prepare, it looks to combo boxes, sees what is
selected and displays apprpriate labels and text boxes and hides the
ones not needed
for example
for btnPrepare_Click......
dim var1 as string = cboSelected.text
dim var2 as string = cboSelectiontwo.text
if var1="All" and Var2="Qty" then
..... show some textboxes hide others etc.
.....
Now I also have a Calculate button and when that is pressed i want to
take values and calc them.
Can I somehow give every IF Block above a name and then use it there
for btnCalculate_Click
i dont know if this makes sense but thanks for any help 4 1051
Ron,
Can you tell us the sense of this, it gives me the idea that you think that
calculating takes time.
Cor
"Ron" <pt*****@yahoo.comschreef in bericht
news:11*********************@k78g2000cwa.googlegro ups.com...
Can something like this be done?
Say I have two buttons a Prepare and Calculate button.
when the user hits Prepare, it looks to combo boxes, sees what is
selected and displays apprpriate labels and text boxes and hides the
ones not needed
for example
for btnPrepare_Click......
dim var1 as string = cboSelected.text
dim var2 as string = cboSelectiontwo.text
if var1="All" and Var2="Qty" then
.... show some textboxes hide others etc.
....
Now I also have a Calculate button and when that is pressed i want to
take values and calc them.
Can I somehow give every IF Block above a name and then use it there
for btnCalculate_Click
i dont know if this makes sense but thanks for any help
My guess is he wants to give the user different things to calculate, and
doesn't want to confuse him by having "FieldB" on the screen when it
doesn't apply to the selected calculation.
I would enable/disable or change the visibility of the controls when they
change the item in the dropdown box, and save them the trouble of clicking
a <Preparebutton.
Robin S.
-------------------------------
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:O4**************@TK2MSFTNGP02.phx.gbl...
Ron,
Can you tell us the sense of this, it gives me the idea that you think
that calculating takes time.
Cor
"Ron" <pt*****@yahoo.comschreef in bericht
news:11*********************@k78g2000cwa.googlegro ups.com...
>Can something like this be done?
Say I have two buttons a Prepare and Calculate button.
when the user hits Prepare, it looks to combo boxes, sees what is selected and displays apprpriate labels and text boxes and hides the ones not needed
for example
for btnPrepare_Click......
dim var1 as string = cboSelected.text dim var2 as string = cboSelectiontwo.text
if var1="All" and Var2="Qty" then
.... show some textboxes hide others etc.
.... Now I also have a Calculate button and when that is pressed i want to take values and calc them.
Can I somehow give every IF Block above a name and then use it there for btnCalculate_Click
i dont know if this makes sense but thanks for any help
Ron wrote:
when the user hits Prepare, it looks to combo boxes, sees what is
selected and displays apprpriate labels and text boxes and hides the
ones not needed
.. . .
dim var1 as string = cboSelected.text
dim var2 as string = cboSelectiontwo.text
if var1="All" and Var2="Qty" then
.... show some textboxes hide others etc.
Personally, I'd hook this up to the SelectedIndexChanged event on both
ComboBoxes ...
Sub Combo_SelectedIndexChanged( ... ) _
Handles cboSelected.SelectedIndexChanged _
, cboSelectiontwo.SelectedIndexChanged
if var1="All" and Var2="Qty" then
.... show some textboxes hide others etc.
If cboSelected.SelectedIndex <-1 _
AndAlso cboSelectiontwo.SelectedIndex <-1 _
Then
btnCalculte.Enabled = True
Else
btnCalculte.Enabled = False
End If
End Sub
Now I also have a Calculate button and when that is pressed i want to
take values and calc them.
Can I somehow give every IF Block above a name and then use it there
for btnCalculate_Click
How about this?
Sub btnCalculate_Click( ... )
Dim sSum As String _
= cboSelected.Text & ":" & cboSelectionTwo.Text
Select Case sSum.ToLower()
Case "all:qty"
...
Case Else
Debugger.Break()
End Select
HTH,
Phill W.
Ron wrote:
<snip>
when the user hits Prepare, it looks to combo boxes, sees what is
selected and displays apprpriate labels and text boxes and hides the
ones not needed
<snip>
dim var1 as string = cboSelected.text
dim var2 as string = cboSelectiontwo.text
if var1="All" and Var2="Qty" then
.... show some textboxes hide others etc.
<snip>
Now I also have a Calculate button and when that is pressed i want to
take values and calc them.
Can I somehow give every IF Block above a name and then use it there
for btnCalculate_Click
<snip>
If you need the textboxes that were enabled by the Prepare button, I
guess you can save them in a form level list (say, a List(Of TextBox),
if you're using VB 2005), and the Calculate button would just iterate
by them;
Alternatively you may have a CalculateParams class, for example, which
you'd initialize while still in prepare and use in the Calculate.
HTH.
Regards,
Branco. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: itsharkopath |
last post by:
Hi,
Imagine a user in a hotspot, when he comes to the hotspot and tries
to load a webpage (on the internet), he would automatically redirected
to login page.
I believe the following is to be...
|
by: Steven T. Hatton |
last post by:
This was written for the gnu.g++.help list. It rather clearly spells out the
most important feature of Java that I believe C++ lacks. I really don't
believe the C++ Standard sepcifies enough for a...
|
by: jaialai technology |
last post by:
I want to reload a url in a browser window so I do something like this:
open(window.location.href= "www.yahoo.com");
ok, so now I want to do something when that page is done loading
completely....
|
by: Morten Overgaard |
last post by:
Hi
I have a C# component which fires events. I want to catch these events in my
MFC app compiled with the /clr.
I know I can define a managed class in my MFC app which traps the events -
but I...
|
by: Sharon |
last post by:
I'm writing a new control derived from UserControl.
I need to get an event when the control is done resizing.
I tried the Resize, SizeChanged, Move and the Layout events and I also tried
to...
| |
by: Miguel Dias Moura |
last post by:
Hi,
When I subscribe a web site I usually receive an email to confirm my
subscription. Only after I follow the link in the email my account gets
activated.
In general, how is this done? Can...
|
by: BrianDH |
last post by:
Group
Early this week I ask for examples on how to call a VB.NET Web Service and
access its DataSet for a traditional ASP page.
I was told, "you can't", "won't work", "not possible".
Well I...
|
by: Ark |
last post by:
Hello NG,
I arrange data in structs like
{
members...
uint16_t crc;
more members, maybe...
}
Then I need to save them, up to and including crc, in non-volatile
memory or a file, as the case...
|
by: maya |
last post by:
http://news.yahoo.com/news?tmpl=index2&cid=703
down the page, under "More Stories", there's a section with two
interchangeable divs which slide back and forth into view.. how is this
done?
I...
|
by: poolboi |
last post by:
hey guys,
i've done most of my web app. for searching almost done
but then i got a small little problem with logging in
i need to know how session tracking is done in perl
if not my log in page...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |