|
-
August 7th, 2001, 06:34 AM
#1
setting state of a button
How can I set the state of a button so that it looks as if it is pushed?
thanx,
ds
-
August 7th, 2001, 06:48 AM
#2
Re: setting state of a button
'you do this with toolbar buttons (not with commandbutton). Add a toolbar to
'your form (=microsoft windows common controls) and this code:
With Toolbar1
.Buttons.Add , "AA", "AA"
.Buttons("AA").Value = tbrPressed
End With
'you may assign pictures (icons) to these buttons just adding a imagelist
'control, adding images to it and assigning the imagelist to the listimage
'property of toolbar, then assigning a image to each button by index or by
'key
Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris
and all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
The Rater
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
August 7th, 2001, 02:22 PM
#3
Re: setting state of a button
You can't, but you can achieve the same results using a CheckBox.
add a new CheckBox, set style to 1-Graphical and walla! you have a command button. set its value to 1 or 0 to make it pushed or unpushed.
----------
The @host is everywhere!
----------
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|