Jump to content
Sign in to follow this  
strate

Problem with _GUICtrlListView_SetBkImage

Recommended Posts

I am unable to get tis to work, searching provides three threads that get me nowhere, I'm lost.

The problem is the background image isn't working.

#include <GuiListView.au3>

$GUI = GUICreate("ListView Set Background Image", 600, 550)
$hListView = _GUICtrlListView_Create ($GUI, "", 2, 2, 596, 500, -1, -1, True)
_GUICtrlListView_SetBkImage($hListView,'H:\manager.jpg',1)

GUISetState()
Do
    Sleep(20)
Until GUIGetMsg() = $GUI_EVENT_CLOSE
Exit
Edited by strate

INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...

Share this post


Link to post
Share on other sites

I don't have any problems with it working.

#include <GuiConstantsEx.au3>
#include <GuiListView.au3>

    Local $sURL = "http://www.autoitscript.com/autoit3/files/graphics/autoit9_wall_grey_800x600.jpg"
    Local $sFilePath = @ScriptDir & "\AutoIt.jpg"
    InetGet($sURL, $sFilePath)

$GUI = GUICreate("ListView Set Background Image", 600, 550)
$hListView = _GUICtrlListView_Create ($GUI, "", 2, 2, 596, 500, -1, -1, True)
;~ _GUICtrlListView_SetBkImage($hListView,'H:\manager.jpg',1)
    _GUICtrlListView_SetBkImage ($hListView, $sFilePath)

GUISetState()
Do
    Sleep(20)
Until GUIGetMsg() = $GUI_EVENT_CLOSE
Exit

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Your example works, as well as the one in the help file. The only difference between yours and mine is that your image is downloaded.

Doesn't matter if the image is there, after running it one time (image is local after run once), run the following:

#include <GuiConstantsEx.au3>
#include <GuiListView.au3>

;~  Local $sURL = "http://www.autoitscript.com/autoit3/files/graphics/autoit9_wall_grey_800x600.jpg"
    Local $sFilePath = @ScriptDir & "\AutoIt.jpg"
;~  InetGet($sURL, $sFilePath)

$GUI = GUICreate("ListView Set Background Image", 600, 550)
$hListView = _GUICtrlListView_Create ($GUI, "", 2, 2, 596, 500, -1, -1, True)
;~ _GUICtrlListView_SetBkImage($hListView,'H:\manager.jpg',1)
    _GUICtrlListView_SetBkImage ($hListView, $sFilePath)

GUISetState()
Do
    Sleep(20)
Until GUIGetMsg() = $GUI_EVENT_CLOSE
Exit

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
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
Sign in to follow this  

×
×
  • Create New...