Tri-state controls: blast from the past? 
Author Message
 Tri-state controls: blast from the past?

Hey everyone,
    I seem to remember, about a million years ago, that there was a
tri-state checkbox in VB.  Perhaps it was an add-on - can't remember that
far back.  Does anyone know if there is still such an option available?
Perhaps it's just some setting on the standard checkbox that I am missing.
The meaing of tri-state was selected, not selected, or excluded.

If anyone remembers, or uses such an option, please let me know where it is!

Thanks,

Rich.

P.S. - I am using VB6.



Tue, 19 Oct 2004 09:06:48 GMT  
 Tri-state controls: blast from the past?
Back to Future?

chkYourCheckBox.Value = 0    '    Unchecked
chkYourCheckBox.Value = 1    '    Checked
chkYourCheckBox.Value = 2    '    Grayed

Mikhail Berlyant
Data Integrator, Data Systems
Launch Your Yahoo!Music Experience  http://launch.yahoo.com
Brainbench MVP for Visual Basic   www.brainbench.com



Quote:
> Hey everyone,
>     I seem to remember, about a million years ago, that there was a
> tri-state checkbox in VB.  Perhaps it was an add-on - can't remember that
> far back.  Does anyone know if there is still such an option available?
> Perhaps it's just some setting on the standard checkbox that I am missing.
> The meaing of tri-state was selected, not selected, or excluded.

> If anyone remembers, or uses such an option, please let me know where it
is!

> Thanks,

> Rich.

> P.S. - I am using VB6.



Tue, 19 Oct 2004 09:20:25 GMT  
 Tri-state controls: blast from the past?
Yeah, I can did get that far.  But that's if I set things manually.  Any
tips on getting that to work with the mouse?  If you use the following code,
you lose your stack in an infinite loop:

Private Sub cbxHI_Click()
    Select Case cbxHI.Value
        Case 0:
            cbxHI.Value = 1
        Case 1:
            cbxHI.Value = 2
        Case 2:
            cbxHI.Value = 0
    End Select
End Sub

If I could just break out of the loop after setting the value myself, this
would work fine.  I tried mousedown, but that fires before _Click(), so
_Click() overwrites anything I do in the mousedown functions.

Thanks for the reply,

Rich.


Quote:
> Back to Future?

> chkYourCheckBox.Value = 0    '    Unchecked
> chkYourCheckBox.Value = 1    '    Checked
> chkYourCheckBox.Value = 2    '    Grayed

> Mikhail Berlyant
> Data Integrator, Data Systems
> Launch Your Yahoo!Music Experience  http://launch.yahoo.com
> Brainbench MVP for Visual Basic   www.brainbench.com



> > Hey everyone,
> >     I seem to remember, about a million years ago, that there was a
> > tri-state checkbox in VB.  Perhaps it was an add-on - can't remember
that
> > far back.  Does anyone know if there is still such an option available?
> > Perhaps it's just some setting on the standard checkbox that I am
missing.
> > The meaing of tri-state was selected, not selected, or excluded.

> > If anyone remembers, or uses such an option, please let me know where it
> is!

> > Thanks,

> > Rich.

> > P.S. - I am using VB6.



Tue, 19 Oct 2004 09:27:40 GMT  
 Tri-state controls: blast from the past?

were released on Thu, 2 May 2002 18:20:25 -0700 bearing the
following fruit:

Quote:
>Back to Future?

>chkYourCheckBox.Value = 0    '    Unchecked
>chkYourCheckBox.Value = 1    '    Checked
>chkYourCheckBox.Value = 2    '    Grayed

Or better (IMHO)

chkYourCheckBox.Value = VbUnchecked
chkYourCheckBox.Value = VbChecked
chkYourCheckBox.Value = VbGreyed

Quote:
>Mikhail Berlyant
>Data Integrator, Data Systems
>Launch Your Yahoo!Music Experience  http://launch.yahoo.com
>Brainbench MVP for Visual Basic   www.brainbench.com



>> Hey everyone,
>>     I seem to remember, about a million years ago, that there was a
>> tri-state checkbox in VB.  Perhaps it was an add-on - can't remember that
>> far back.  Does anyone know if there is still such an option available?
>> Perhaps it's just some setting on the standard checkbox that I am missing.
>> The meaing of tri-state was selected, not selected, or excluded.

>> If anyone remembers, or uses such an option, please let me know where it
>is!

>> Thanks,

>> Rich.

>> P.S. - I am using VB6.



Tue, 19 Oct 2004 15:46:51 GMT  
 Tri-state controls: blast from the past?
Hi Rich:

Here is one way to do it.

Bill

Private Sub cbxHI_Click()
  Static intCheckType As Integer
  Static blnActive As Boolean

  If blnActive Then Exit Sub
  blnActive = True

  intCheckType = intCheckType + 1
  If intCheckType > 2 Then intCheckType = 0

  Select Case intCheckType
    Case 0:
      cbxHI.Value = vbUnchecked
    Case 1:
      cbxHI.Value = vbChecked
    Case 2:
      cbxHI.Value = vbGrayed
  End Select

  blnActive = False

End Sub



Quote:
>Yeah, I can did get that far.  But that's if I set things manually.  Any
>tips on getting that to work with the mouse?  If you use the following code,
>you lose your stack in an infinite loop:

>Private Sub cbxHI_Click()
>    Select Case cbxHI.Value
>        Case 0:
>            cbxHI.Value = 1
>        Case 1:
>            cbxHI.Value = 2
>        Case 2:
>            cbxHI.Value = 0
>    End Select
>End Sub

>If I could just break out of the loop after setting the value myself, this
>would work fine.  I tried mousedown, but that fires before _Click(), so
>_Click() overwrites anything I do in the mousedown functions.

>Thanks for the reply,

>Rich.



>> Back to Future?

>> chkYourCheckBox.Value = 0    '    Unchecked
>> chkYourCheckBox.Value = 1    '    Checked
>> chkYourCheckBox.Value = 2    '    Grayed

>> Mikhail Berlyant
>> Data Integrator, Data Systems
>> Launch Your Yahoo!Music Experience  http://launch.yahoo.com
>> Brainbench MVP for Visual Basic   www.brainbench.com



>> > Hey everyone,
>> >     I seem to remember, about a million years ago, that there was a
>> > tri-state checkbox in VB.  Perhaps it was an add-on - can't remember
>that
>> > far back.  Does anyone know if there is still such an option available?
>> > Perhaps it's just some setting on the standard checkbox that I am
>missing.
>> > The meaing of tri-state was selected, not selected, or excluded.

>> > If anyone remembers, or uses such an option, please let me know where it
>> is!

>> > Thanks,

>> > Rich.

>> > P.S. - I am using VB6.



Wed, 20 Oct 2004 08:56:43 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Basix Fanzine: A Blast from the past

2. A Blast from the Past...

3. treeview checkbox tri-state (grayed)?

4. All Tri State People

5. Any way to make a custom control paint past edge of container

6. Any way to make a custom control paint past edge of container

7. Can I past graph picture into RichTextBox Control ?

8. Make a control extend past form?

9. opentextfile - tristate values

10. report by year and then tri-monthly (version 6.0.1)

11. URGENT: Du/Tri/...plicating records in Crystal 4.6

12. Tristate checkboxes (really stupid question)

 

 
Powered by phpBB® Forum Software