Jump to content

Trying to make ListView background transparent


supersonic
 Share

Recommended Posts

Hi everybody,

I'm trying to embed icons into a ListView _WITH_ transparent icon background.

The icons I used have transparency but the ListView ignores it. Any ideas?

Here's my code example:

#include <Array.au3>
#include <File.au3>
#include <GUIComboBox.au3>
#include <GUIConstants.au3>
#include <GUIListView.au3>
#include <String.au3>


Global $mainGUI = GUICreate("TEST", 400, 300, -1, -1)
Global $mainLV  = GUICtrlCreateListView("text1|text2", 1, 1, 398, 298, $LVS_SORTDESCENDING, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_GRIDLINES))


_GUICtrlListView_SetColumnOrder($mainLV, "1|0")
GUICtrlSetBkColor($mainLV, $GUI_BKCOLOR_LV_ALTERNATE)
; GUICtrlSetFont($mainLV, 7.0, 400, 0, "Courier New")
GUISetState(@SW_SHOW, $mainGUI)


For $i = 1 to 30 Step 1
    GUICtrlCreateListViewItem("text1|text2", $mainLV)
    GUICtrlSetBkColor(-1, 0xF0F0F0)
    GUICtrlSetImage(-1, @ScriptDir & "\test.ico", 0, 1)
Next


While GUIGetMsg() <> -3
WEnd

For the icon, please see the attachment.

Greets,

-supersonic.

test.ico

Link to comment
Share on other sites

  • 3 years later...

Hi everybody,

I'm trying to embed icons into a ListView _WITH_ transparent icon background.

The icons I used have transparency but the ListView ignores it. Any ideas?

Here's my code example:

#include <Array.au3>
#include <File.au3>
#include <GUIComboBox.au3>
#include <GUIConstants.au3>
#include <GUIListView.au3>
#include <String.au3>


Global $mainGUI = GUICreate("TEST", 400, 300, -1, -1)
Global $mainLV  = GUICtrlCreateListView("text1|text2", 1, 1, 398, 298, $LVS_SORTDESCENDING, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_GRIDLINES))


_GUICtrlListView_SetColumnOrder($mainLV, "1|0")
GUICtrlSetBkColor($mainLV, $GUI_BKCOLOR_LV_ALTERNATE)
; GUICtrlSetFont($mainLV, 7.0, 400, 0, "Courier New")
GUISetState(@SW_SHOW, $mainGUI)


For $i = 1 to 30 Step 1
    GUICtrlCreateListViewItem("text1|text2", $mainLV)
    GUICtrlSetBkColor(-1, 0xF0F0F0)
    GUICtrlSetImage(-1, @ScriptDir & "test.ico", 0, 1)
Next


While GUIGetMsg() <> -3
WEnd

For the icon, please see the attachment.

Greets,

-supersonic.

wow, 4 years :oops:

i cant find anything else on the forums as of yet :

Link to comment
Share on other sites

  • Moderators

MegaGamerGuy,

And the point of that post was? :doh:

Necroing a thread to ask a question or to add a solution I can just about understand, but this.... :bye:

If you were thinking of adding a similar post to every long-dead thread that catches your eye - I suggest you forget it immediately. :oops:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...