GMan Well-Known Member Licensed User Longtime User Jul 22, 2013 #1 Yahoo Folks, is it possible to create a 3-state toggle button, like a checkbox which has also 3 states (1. Checked, 2. Unchecked, 3. filled with some gray color) ? Could work like a "switch knob" with positions 1,2,3 or so....
Yahoo Folks, is it possible to create a 3-state toggle button, like a checkbox which has also 3 states (1. Checked, 2. Unchecked, 3. filled with some gray color) ? Could work like a "switch knob" with positions 1,2,3 or so....
derez Expert Licensed User Longtime User Jul 22, 2013 #2 GMan said: Yahoo Folks, is it possible to create a 3-state toggle button, like a checkbox which has also 3 states (1. Checked, 2. Unchecked, 3. filled with some gray color) ? Could work like a "switch knob" with positions 1,2,3 or so.... Click to expand... For button, you can use the following with any button: Code: Copy Sub btn_click Select btn.text Case "first" btn.Text = "second" 'do things Case "second" btn.Text = "third" 'do things Case "third" btn.Text = "first" 'do things End Select End Sub for checkbox - you'll need to create a class, it is possible. Upvote 0
GMan said: Yahoo Folks, is it possible to create a 3-state toggle button, like a checkbox which has also 3 states (1. Checked, 2. Unchecked, 3. filled with some gray color) ? Could work like a "switch knob" with positions 1,2,3 or so.... Click to expand... For button, you can use the following with any button: Code: Copy Sub btn_click Select btn.text Case "first" btn.Text = "second" 'do things Case "second" btn.Text = "third" 'do things Case "third" btn.Text = "first" 'do things End Select End Sub for checkbox - you'll need to create a class, it is possible.
GMan Well-Known Member Licensed User Longtime User Jul 22, 2013 #3 Thx 4 u reply David, but this i know and use it this time with a picturebox - because i want to have visual feedback about the button state, so off , green and (maybe) yellow. I like to have a train signal displayed, which (in standard version) has a green, a red and a yellow light and (each means something other) want that color status displayd in the button like a toggle button. so i will try a picturebox with the code and change the picture depending on the 1st,2nd or 3rd click.... Upvote 0
Thx 4 u reply David, but this i know and use it this time with a picturebox - because i want to have visual feedback about the button state, so off , green and (maybe) yellow. I like to have a train signal displayed, which (in standard version) has a green, a red and a yellow light and (each means something other) want that color status displayd in the button like a toggle button. so i will try a picturebox with the code and change the picture depending on the 1st,2nd or 3rd click....
Erel B4X founder Staff member Licensed User Longtime User Jul 23, 2013 #4 You can use the Tag property to save the current state. Upvote 0