bitmap.transparent does not work

Here one can report bugs or hold discussions about bugs updates and work arounds.
Post Reply
Angel
Posts: 87
Joined: Sat Nov 19, 2011 9:34 am

bitmap.transparent does not work

Post: # 865Post Angel
Sat Apr 21, 2012 2:34 pm

Bitmap loaded to tabControl or bitmap loaded to treeview, etc. only work in opaque mode.
BmpResource(bitmap) added to menuitem also alone works in opaque mode.
This is my code:
Dim btmBitmap As Bitmap
  With btmBitmap
  Height=16
  Width=16
  Transparent=True
  `gray transparent color
  Transparentcolor=Rgb(192,192,192)
  `TransparentMode=TmAuto
  Loadfromfile("bitmap.bmp")
  End With
Object frmForm As Form
Caption="Form1"
Height=480
Width=640
Center
`Otros objetos
Object trvTreeview As Treeview
  Left=10
  Top=10
  Width=200
  Height=150
  `Sorted=True
  Additem("Item1",-1)
  Additem("Item2",-1)
  Additem("SubItem1",0)
  Additem("SubItem3",2)
`Only work in opaque mode
  Addbmp(0,btmBitmap)
  Bmpindex(0)=0
  `OnChange=trvTreeview_Onchange
End Object
Object tabTabcontrol As Tabcontrol
  `Align=alLeft
  Left=10
  Top=10
  Width=200
  Height=150
  `Multiline=True
  Addtab("Tab1")
  Addtab("Tab2")
  `Only work in opaque mode
  Addbmp(btmBitmap)
  `OnChange=tabTacontrol_Onchange
End Object

`Fin otros objetos
`OnShow=frmForm_OnShow
`OnClose=frmForm_OnClose
End Object
frmForm.showmodal

Post Reply