Page 1 of 1 1
Topic Options
#91563 - 2003-02-20 07:32 PM Image On Form
Austin Offline
Seasoned Scripter

Registered: 2002-01-24
Posts: 439
When inserting a picture I am getting a black box around the image.. is this because I am inserting it directly on a form? Is there an option I am missing to stop that?

Thanks
_________________________
Austin Henderson

Top
#91564 - 2003-02-20 08:17 PM Re: Image On Form
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
mm...
I have no borders...
are you doing it as image or imaged button?

what you get on the form if you just put:

$image=$form.image(32,10,10)
_________________________
!

download KiXnet

Top
#91565 - 2003-02-20 08:30 PM Re: Image On Form
Austin Offline
Seasoned Scripter

Registered: 2002-01-24
Posts: 439
code:
 $HLPIcon	= $form.Image("$InstallDir\help.bmp",10,1,20,20) 

I do want it to be able to be a button though so perhaps I am using teh wrong object. Will look at how to do the image button.
_________________________
Austin Henderson

Top
#91566 - 2003-02-21 01:12 AM Re: Image On Form
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
if you want it button, the toolbutton should be right way for you.

it comes with flatstyle (no borders)
_________________________
!

download KiXnet

Top
#91567 - 2003-02-21 02:08 AM Re: Image On Form
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
If you want to display an image on a ToolButton (right now)- have to use the ImageList to host the image first - then copy into ToolButton, for example:



Break On
 
$Form = CreateObject("Kixtart.Form")
 
$ImageList = $Form.ImageList
$ImageList.ImageSize = 32,32
$ImageList.Images.Add(".\kixtart.bmp")
 
$Button = $Form.ToolButton
$Button.Size = 50,50
$Button.Center
$Button.Icon = $ImageList.Images(0)
 
$Form.Show
While $Form.Visible
 $=Execute($Form.DoEvents)
Loop
 
Exit 1




One of the advantages of this is that you can resize the bitmap using the ImageList ImageSize property. So for example - the LOGO from this BMP gets "shrunk" to 32x32 then displayed on the button.
-Shawn

[ 21. February 2003, 02:10: Message edited by: Shawn ]

Top
#91568 - 2003-02-21 02:25 AM Re: Image On Form
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
heh, just remembered that this was discussed in some form before:
http://www.kixtart.org/board/ultimatebb.php?ubb=get_topic;f=13;t=000338
_________________________
!

download KiXnet

Top
#91569 - 2003-02-21 03:18 PM Re: Image On Form
Austin Offline
Seasoned Scripter

Registered: 2002-01-24
Posts: 439
Thanks so much guys.. the button option is SWEET. Just what I wanted to do.

Just wanted to let the board know.
_________________________
Austin Henderson

Top
Page 1 of 1 1


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

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.104 seconds in which 0.071 seconds were spent on a total of 12 queries. Zlib compression enabled.

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