Page 2 of 2 <12
Topic Options
#91518 - 2003-02-26 08:48 AM Re: ObjectButton
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
toolbutton is perfect too ( I use it everywhere) and it does not look like button when you set it's "flatstyle" property to 1
_________________________
!

download KiXnet

Top
#91519 - 2003-02-26 10:53 AM Re: ObjectButton
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
Works fine Jochen.. just pulling your leg. [Wink] [Razz]
Top
#91520 - 2003-02-26 10:11 PM Re: ObjectButton
Austin Offline
Seasoned Scripter

Registered: 2002-01-24
Posts: 439
Right... I actually ended up using this code..

code:
 $ImageList2 			= $fraDetails2.ImageList
$ImageList2.ImageSize = 15,15
$ImageList2.Images.Add("$InstallDir\bang.bmp")
$ImageList2.Images.Add("$InstallDir\bangred.bmp")
$ImageList2.Images.Add("$InstallDir\banggreen.bmp")
$ImageList2.TabStop = 0

$CHGIcon = $fraDetails2.ToolButton
$CHGIcon.Size = 15,15
$CHGIcon.Top = $lblCHG.TOP - 2
$CHGIcon.Icon = $ImageList2.Images(0)
$CHGIcon.Left = $lblCHG.WIDTH + 10
$CHGIcon.OnClick = "DrawError()"
$CHGIcon.FlatStyle = 0
$CHGIcon.TabStop = 0
$CHGIcon.Border = 2

Problem was that I was using a single statement to declare everyting when using the picturebox like this:
code:
 $Image = $fraDetails2.Image("$InstallDir\bang.bmp",$lblCHG.WIDTH + 10,$lblCHG.TOP - 2,15,15)
$Image.OnDblClick = "DrawError"

Reason it would not work is because I was chaning the picture in other cases in the script with the same call but I was having to redefine the $Image.OnDblClick.

Anyways the above code solved the problem.

Thanks for the help..
_________________________
Austin Henderson

Top
Page 2 of 2 <12


Moderator:  Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 657 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.06 seconds in which 0.035 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org