Well, I need to have a background image.
Then, I'm going to add a listbox on to the background image; I want a transparent listbox.
How can i do it?
Thanks in advance.
[Solved] ListBox transparent
[Solved] ListBox transparent
Last edited by empardopo on 15 Jan 2015, 08:57, edited 2 times in total.
Everything is possible!
Re: ListBox transparent
may be a listview would do better as I'm not sure about an easy way to get transparency of a child window
there is something about using picture with listview see ListView Remarks in the help file
and if it must be a listbox, use ListView as normal and set the view to List instead of Report
there is something about using picture with listview see ListView Remarks in the help file
and if it must be a listbox, use ListView as normal and set the view to List instead of Report
Re: ListBox transparent
Ufff! I'll take a look. At this moment, I'm lost.
Thanks.
Thanks.
Everything is possible!
Re: ListBox transparent
A forum search for listbox transparent or transparent listbox might be helpful.
Re: ListBox transparent
Now, I'm not sure if I made the search here or google! Thanks very much.just me wrote:A forum search for listbox transparent or transparent listbox might be helpful.
I want make you two questions about your class:
1.- Is it possible to hide the vertical scroll bar?
2.- Is it possible to hide the listbox's border?
Thanks very much for your help and your class!
Everything is possible!
Re: ListBox transparent
You might specify the -VScroll (scroll bar) and/or -E0x200 (border) options for the ListBox, but the mouse wheel will be the only option for scrolling, then.
Re: ListBox transparent
-E0x200 works perfect for me.
-VScroll has a function of hide and disable. It's a shame! I need able to scrolling by pressing keys.
Thanks very much.
And last question (by the moment , the transparency of the listbox is not full! Is It possible to get a full transparency?
Thanks in advance.
-VScroll has a function of hide and disable. It's a shame! I need able to scrolling by pressing keys.
Thanks very much.
And last question (by the moment , the transparency of the listbox is not full! Is It possible to get a full transparency?
Thanks in advance.
Everything is possible!
Re: ListBox transparent
I just noticed some other glitches with the class. I'll post an update as soon as I'm ready with it. It might support scrolling by key, if I get it to work properly.
In the meantime, would you please post the code you're using?
In the meantime, would you please post the code you're using?
Re: ListBox transparent
At this moment, I'm using the source code of the example with a tiny modification
Why when I press the down key or the a key I don't get scroll down?
Thanks in advance.
Code: Select all
#NoEnv
PicFile := A_WinDir . "\Web\Wallpaper\Blaues Fenster.jpg" ; German Win XP
PicFile := A_WinDir . "\Web\Wallpaper\Landscapes\img7.jpg" ; HP Win 7
Content := "One|Two|Three|Four|Five|Six|Seven|Eight|Nine|Ten|Eleven|Twelve|Thirteen|Fourteen|Fifteen|Sixteen"
; ----------------------------------------------------------------------------------------------------------------------
Global hMain
Gui, New, hwndhMain -Caption
Gui, Font, s15 bold, Tahoma
Gui, Add, Picture, x0 y0 w600 h400 hwndhPic, %PicFile%
;Gui, Add, ListBox, x50 y50 w200 r8 vLB1 gSel1 Choose1, %Content%
;Gui, Add, ListBox, x+100 yp wp hp hwndhLB vLB Choose1 gSelection, %Content%
Gui, Add, ListBox, -VScroll -E0x200 x100 y100 h225 hwndhLB vLB Choose1 gSelection, %Content%
TLB := New TransparentListBox(hLB, hPic, 0x000000, 0x0000FF, 0xFFFFFF, 128)
Gui, Show, w600 h400, Transparent ListBox
Return
; ----------------------------------------------------------------------------------------------------------------------
Esc::
GuiClose:
ExitApp
; ----------------------------------------------------------------------------------------------------------------------
#If WinActive("ahk_id " . hMain)
!x::
Random, R, 0, % TLB.ItemCount
GuiControl, %hMain%:Choose, LB, %R%
Return
Up::
;MsgBox % TLB.Items[]
MsgBox % TLB.CurSel
return
Down::
a::
temp := TLB.Cursel + 1
GuiControl, %hMain%:Choose, LB, %temp%
return
#If
; ----------------------------------------------------------------------------------------------------------------------; ----------------------------------------------------------------------------------------------------------------------
k::
Selection:
GuiControlGet, LB
ToolTip, Selected: %LB%`nA_GuiEvent: %A_GuiEvent%`nA_EventInfo: %A_EventInfo%
SetTimer, KillTT, -750
Return
Sel1:
GuiControlGet, LB1
ToolTip, Selected: %LB1%`nA_GuiEvent: %A_GuiEvent%`nA_EventInfo: %A_EventInfo%
SetTimer, KillTT, -750
Return
KillTT:
ToolTip
Return
; ----------------------------------------------------------------------------------------------------------------------
#Include Class_TransparentListBox.ahk
Thanks in advance.
Everything is possible!
Re: ListBox transparent
I don't understand why
works fine and this
not!
Any idea?
Code: Select all
#If WinActive("ahk_id " . hMain)
!x::
Random, R, 0, % TLB.ItemCount
GuiControl, %hMain%:Choose, LB, %R%
Return
#If
works fine and this
Code: Select all
#If WinActive("ahk_id " . hMain)
Down::
a::
R := TLB.Cursel + 1
if R < 15
GuiControl, %hMain%:Choose, LB, %R%
MsgBox % TLB.Cursel R
return
#If
Any idea?
Everything is possible!
Re: ListBox transparent
I think now It's work fine!!!!!!
The final source code
The modified part
The final source code
Code: Select all
#NoEnv
PicFile := A_WinDir . "\Web\Wallpaper\Blaues Fenster.jpg" ; German Win XP
PicFile := A_WinDir . "\Web\Wallpaper\Landscapes\img7.jpg" ; HP Win 7
Content := "One|Two|Three|Four|Five|Six|Seven|Eight|Nine|Ten|Eleven|Twelve|Thirteen|Fourteen|Fifteen|Sixteen"
; ----------------------------------------------------------------------------------------------------------------------
Global hMain
Gui, New, hwndhMain -Caption
Gui, Font, s15 bold, Tahoma
Gui, Add, Picture, x0 y0 w600 h400 hwndhPic, %PicFile%
;Gui, Add, ListBox, x50 y50 w200 r8 vLB1 gSel1 Choose1, %Content%
;Gui, Add, ListBox, x+100 yp wp hp hwndhLB vLB Choose1 gSelection, %Content%
Gui, Add, ListBox, -VScroll -E0x200 x100 y100 h225 hwndhLB vLB Choose1 gSelection, %Content%
TLB := New TransparentListBox(hLB, hPic, 0x000000, 0x0000FF, 0xFFFFFF, 128)
Gui, Show, w600 h400, Transparent ListBox
Return
; ----------------------------------------------------------------------------------------------------------------------
Esc::
GuiClose:
ExitApp
; ----------------------------------------------------------------------------------------------------------------------
#If WinActive("ahk_id " . hMain)
!x::
Random, R, 0, % TLB.ItemCount
GuiControl, %hMain%:Choose, LB, %R%
Return
#If
#If WinActive("ahk_id " . hMain)
Up::
;MsgBox % TLB.Items[]
;MsgBox % TLB.CurSel
R := TLB.Cursel - 0
if R > 0
GuiControl, %hMain%:Choose, LB, %R%
return
#If
#If WinActive("ahk_id " . hMain)
Down::
a::
R := TLB.Cursel + 2
if R < TLB.ItemCount
GuiControl, %hMain%:Choose, LB, %R%
;MsgBox % TLB.Cursel R
return
#If
; ----------------------------------------------------------------------------------------------------------------------; ----------------------------------------------------------------------------------------------------------------------
k::
Selection:
GuiControlGet, LB
ToolTip, Selected: %LB%`nA_GuiEvent: %A_GuiEvent%`nA_EventInfo: %A_EventInfo%
SetTimer, KillTT, -750
Return
Sel1:
GuiControlGet, LB1
ToolTip, Selected: %LB1%`nA_GuiEvent: %A_GuiEvent%`nA_EventInfo: %A_EventInfo%
SetTimer, KillTT, -750
Return
KillTT:
ToolTip
Return
; ----------------------------------------------------------------------------------------------------------------------
#Include Class_TransparentListBox.ahk
Code: Select all
#If WinActive("ahk_id " . hMain)
Up::
R := TLB.Cursel - 0
if R > 0
GuiControl, %hMain%:Choose, LB, %R%
return
#If
#If WinActive("ahk_id " . hMain)
Down::
a::
R := TLB.Cursel + 2
if R < TLB.ItemCount
GuiControl, %hMain%:Choose, LB, %R%
return
#If
Everything is possible!
Who is online
Users browsing this forum: Google [Bot], mmflume, scriptor2016, ShatterCoder and 106 guests