 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
majkinetor
Joined: 24 May 2006 Posts: 3624 Location: Belgrade
|
Posted: Thu Dec 13, 2007 4:20 pm Post subject: |
|
|
the same.
About Notify, if you want to make good wrapper, you should use RegisterCallback to chain your notifications to existing OnMessage handler. _________________
 |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5049 Location: imaginationland
|
Posted: Thu Dec 13, 2007 9:56 pm Post subject: |
|
|
I believe the latest update v1.04 resolves the Edit positioning bug. Since it's impossible (and I hope I'm wrong here) to change a ListView row height I left the edit to adjust its height automatically according to the currently selected font.
| majkinetor wrote: | | About Notify, if you want to make good wrapper, you should use RegisterCallback to chain your notifications to existing OnMessage handler. | How can this be done? _________________
RegExReplace("irc.freenode.net/ahk", "^(?=(.(?=[\0-r\[]*((?<=\.).))))(?:[c-\x73]{2,8}(\S))+((2)|\b[^\2-]){2}\D++$", "$u3$1$3$4$2") |
|
| Back to top |
|
 |
Andreone
Joined: 20 Jul 2007 Posts: 257 Location: Paris, France
|
Posted: Thu Dec 13, 2007 10:18 pm Post subject: |
|
|
I I understand correctly (which is not always the case), I think majekinor is referring to that (stolen from his ComboX script): | Code: | ComboX_setWndProc(hCtrl) {
static cnt=-1, proc
if (cnt=-1)
VarSetCapacity(proc, 40)
cnt++
if (cnt > 10){
msgBox Too many combos
return
}
newProcAddr := RegisterCallback("ComboX_WndProc", "F", 4, &proc + cnt*4)
old := DllCall("SetWindowLong", "UInt", hCtrl, "Int", -4, "Int", newProcAddr, "UInt")
NumPut(old, &proc+cnt*4)
}
ComboX_wndProc(hwnd, uMsg, wParam, lParam){
global ComboX_Active
old := NumGet(A_EventInfo+0)
res := DllCall("CallWindowProcA", "UInt", old, "UInt", hwnd, "UInt", uMsg, "UInt", wParam, "UInt", lParam)
if (uMsg = 8)
ComboX_Hide(hwnd), ComboX_Active := ""
return res
} |
About using LVX, is there a way to have two listviews at the same time with colored rows? |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3624 Location: Belgrade
|
Posted: Fri Dec 14, 2007 1:05 am Post subject: |
|
|
No, comboX use subclassing, which is something that has to be done here too in order to support edit activation via ENTER.
It goes like this:
| Code: | oldfunc := OnMessage(WM_NOTIFY, "LVX_OnNotify")
oldfunc := RegisterCallback(oldfunc, "", 4)
LVX_OnNotify(...){
; do your thing here
return DllCall(oldfunc, wparam, lparam ..... );
}
|
There is tutorial here with Call instead RegisterCallback. _________________
 |
|
| Back to top |
|
 |
Andreone
Joined: 20 Jul 2007 Posts: 257 Location: Paris, France
|
Posted: Fri Dec 14, 2007 1:23 am Post subject: |
|
|
Doesn't the WM_NOTIFY pass through the WndProc?
| majkinetor wrote: | | There is tutorial here with Call instead RegisterCallback. | Very interesting, thanks. |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3624 Location: Belgrade
|
Posted: Fri Dec 14, 2007 8:43 am Post subject: |
|
|
| Quote: | | Doesn't the WM_NOTIFY pass through the WndProc? |
Yes, ofcourse.
I was telling that ComboX doesn't override WM_NOTIFY.
Suggested method is safer to do. _________________
 |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3624 Location: Belgrade
|
Posted: Fri Dec 14, 2007 10:16 am Post subject: |
|
|
2Titan
I updated the tutorial page and posted example without Call module. _________________
 |
|
| Back to top |
|
 |
Klaus
Joined: 12 May 2005 Posts: 192 Location: Münster, Germany
|
Posted: Wed Jan 02, 2008 10:25 am Post subject: Sorting disarranges colouring |
|
|
Hi, Titan,
though it's noted in the sources ("Sorting will not affect coloured rows."), allow me a question mentioning this effect:
When I code a LVX_SetColor, the colour is attached to the row, not to the data. Each sorting or inserting data changes the rows that are coloured.
Does anyone see a chance that once coloured rows keep their colours even when they change their position/line number?
Thanks in advance,
Klaus
PS: Happy New Year everybody! |
|
| Back to top |
|
 |
garry
Joined: 19 Apr 2005 Posts: 1028 Location: switzerland
|
Posted: Wed Jan 02, 2008 11:26 am Post subject: |
|
|
hello Klaus,
made an example, change colors depending extension (not by row number)
http://www.autohotkey.com/forum/post-165703.html#165703
in example:
.....
stringsplit,BX,A_LoopReadLine,`;,
SplitPath,BX2,,,ext,,
LV_Add("",BX1,BX2)
if ext=exe ;when column2 is exe make it green
LVX_SetColour(I, 0x008000)
...... |
|
| Back to top |
|
 |
bmcclure
Joined: 24 Nov 2007 Posts: 446
|
Posted: Fri Jan 11, 2008 4:48 am Post subject: |
|
|
Interesting functions. I was reading the documentation for LVX_CellEdit and noticed this:
The documentation syntax:
| Quote: | | LVX_CellEdit(r, c, set) |
Actual function definition:
| Code: | | LVX_CellEdit(set = true) |
_________________ -Ben
SteamLab
SteamLab Wiki
[Broken] - My industrial music [on GarageBand] |
|
| Back to top |
|
 |
bmcclure
Joined: 24 Nov 2007 Posts: 446
|
Posted: Fri Jan 11, 2008 5:36 am Post subject: |
|
|
I also don't understand how to properly use LVX_CellEdit
I want to use Enter for submit, like the default, but I also need to save the submitted value so that I can change my XML file afterward.
Is there any way I can get the submitted value, or be notified when it is submitted so I can get the new text out of the listview? _________________ -Ben
SteamLab
SteamLab Wiki
[Broken] - My industrial music [on GarageBand] |
|
| Back to top |
|
 |
garry
Joined: 19 Apr 2005 Posts: 1028 Location: switzerland
|
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5049 Location: imaginationland
|
Posted: Fri Jan 11, 2008 4:59 pm Post subject: |
|
|
| bmcclure wrote: | | I want to use Enter for submit, like the default, but I also need to save the submitted value so that I can change my XML file afterward | I forgot to mention in the docs that the function returns the entered value when the user leaves editing mode. You can prevent automatic updating on the ListView by specifying false for the third parameter then later setting it yourself manually with LVX_SetText(). _________________
RegExReplace("irc.freenode.net/ahk", "^(?=(.(?=[\0-r\[]*((?<=\.).))))(?:[c-\x73]{2,8}(\S))+((2)|\b[^\2-]){2}\D++$", "$u3$1$3$4$2") |
|
| Back to top |
|
 |
Jero3n
Joined: 19 Jan 2007 Posts: 151
|
Posted: Fri Jan 11, 2008 5:25 pm Post subject: |
|
|
Looks really nice, this is where I was searching for.
But I have one little problem...
I downloaded the newest version of it, and tried the example given in the first post.
It opens an ahk script, but it don't show anything :S
Yes, I included LVX.ahk, so that isn't the problem.
Please help me  |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5049 Location: imaginationland
|
Posted: Fri Jan 11, 2008 5:30 pm Post subject: |
|
|
| Jero3n wrote: | I downloaded the newest version of it, and tried the example given in the first post.
It opens an ahk script, but it don't show anything :S | I done the same just now and it works fine. What OS are you using? _________________
RegExReplace("irc.freenode.net/ahk", "^(?=(.(?=[\0-r\[]*((?<=\.).))))(?:[c-\x73]{2,8}(\S))+((2)|\b[^\2-]){2}\D++$", "$u3$1$3$4$2") |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|