Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dynamically create SysListView
#12
I defined it as a function  WAI
Then called in a subfunction of the AutoText item,
But it will always execute
Also, I didn't find the event settings on the item by mouse Right-click

It would be much better if the operation on WAI was defined as an argument in the DynamicLV function, e.g: DynamicLV(_s 1 1) ;;set 1 can locate by right-clicking

Autotext autotext8
Trigger $t     Help - how to add the trigger to the macro
Code:
Copy      Help
/b/i/c/m
te :sub.Sub1 ;;1 test DynamicLV

#sub Sub1 m
WAI "a"
_s=
;A  I'm in the line 1
;B  I'm in the line 2
;C  I'm in the line 3

_i=DynamicLV(_s)

sel _i+1
,case 1
,mes "I'm in the line 1"
,case 2
,mes "I'm in the line 2"
,case 3
,mes "I'm in the line 3"
,case 4
,mes "I'm in the line 4"
,case 5
,mes "I'm in the line 5"
,case 6
,mes "I'm in the line 6"

Function WAI
Code:
Copy      Help
function $text ;;Where Am I

;get caller's QM item id and position in source code
int iid pos=Statement(1 0 0 iid)

;go to source code now
mac+ iid
int h=GetQmCodeEditor
act h
SendMessage h SCI.SCI_GOTOPOS pos 0

;Normally you would add iid/pos to an array and go to source code later on user request etc.
;Create a class. Let Add be a function of that class. Let the array be a class field (variable).


Messages In This Thread
Dynamically create SysListView - by Davider - 08-18-2022, 03:15 AM
RE: Dynamically create SysListView - by Davider - 08-18-2022, 09:05 AM
RE: Dynamically create SysListView - by Gintaras - 08-18-2022, 09:19 AM
RE: Dynamically create SysListView - by Kevin - 08-19-2022, 11:31 PM
RE: Dynamically create SysListView - by Davider - 08-20-2022, 12:49 AM
RE: Dynamically create SysListView - by Kevin - 08-20-2022, 03:44 AM
RE: Dynamically create SysListView - by Davider - 08-20-2022, 10:28 AM
RE: Dynamically create SysListView - by Kevin - 08-20-2022, 11:51 AM
RE: Dynamically create SysListView - by Davider - 08-20-2022, 12:10 PM
RE: Dynamically create SysListView - by Davider - 08-20-2022, 11:13 PM
RE: Dynamically create SysListView - by Gintaras - 08-21-2022, 11:35 AM
RE: Dynamically create SysListView - by Davider - 08-21-2022, 12:41 PM
RE: Dynamically create SysListView - by Davider - 08-21-2022, 09:41 PM
RE: Dynamically create SysListView - by Gintaras - 08-22-2022, 11:45 AM
RE: Dynamically create SysListView - by Davider - 08-22-2022, 12:42 PM
RE: Dynamically create SysListView - by Gintaras - 08-22-2022, 01:11 PM
RE: Dynamically create SysListView - by Davider - 08-22-2022, 02:08 PM
RE: Dynamically create SysListView - by Kevin - 08-23-2022, 03:30 AM
RE: Dynamically create SysListView - by Davider - 08-23-2022, 09:40 AM
RE: Dynamically create SysListView - by Davider - 11-04-2022, 02:05 AM
RE: Dynamically create SysListView - by Kevin - 11-04-2022, 05:31 AM
RE: Dynamically create SysListView - by Davider - 11-04-2022, 05:57 AM
RE: Dynamically create SysListView - by Kevin - 11-04-2022, 02:45 PM
RE: Dynamically create SysListView - by Davider - 11-07-2022, 12:19 PM
RE: Dynamically create SysListView - by Kevin - 11-17-2022, 01:37 AM
RE: Dynamically create SysListView - by Davider - 11-25-2022, 04:34 AM
RE: Dynamically create SysListView - by Kevin - 11-27-2022, 02:19 AM
RE: Dynamically create SysListView - by Davider - 11-27-2022, 02:44 AM
RE: Dynamically create SysListView - by Davider - 12-02-2022, 02:24 AM
RE: Dynamically create SysListView - by Davider - 12-02-2022, 12:31 PM
RE: Dynamically create SysListView - by Kevin - 12-02-2022, 05:42 PM
RE: Dynamically create SysListView - by Davider - 12-02-2022, 09:14 PM
RE: Dynamically create SysListView - by Kevin - 12-10-2022, 03:09 AM
RE: Dynamically create SysListView - by Davider - 12-10-2022, 10:47 PM
RE: Dynamically create SysListView - by Davider - 03-26-2023, 02:16 AM
RE: Dynamically create SysListView - by Kevin - 03-27-2023, 01:29 AM
RE: Dynamically create SysListView - by Davider - 03-27-2023, 02:26 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)