Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Block (Column) selection mode
#1
Is possible in a edit control?
#2
Like a grid? No.
#3
Ok.
I was looking for the function "column editing" for NOTEPAD.
#4
If I have this:



how can I get:

IJ
QR
WX


Attached Files Image(s)
   
#5
Code:
Copy      Help
key Ca
str si.getsel
str sl so ss
foreach sl si
,ss.get(sl 1 2)
,so.formata("%s[]" ss)

out so
#6
I do not talk about that. My question is if for example, I select: "JKLMNOPQRSTUVWXY" how can i get:
JK
RS
XY

like a "column selection".
#7
I see what you're looking for. Problem is figuring out how many leading chars there are before the "J" in "JKLMNOPQRSTUVWXY" to offset the other lines with. If it were used just in Notepad I could figure it though. Also I think you meant "JKLMNO[]PQRSTU[]VWXY"
Matt B
#8
Code:
Copy      Help
int i inicio hwnd=child
str t1 t2 a.getwintext(hwnd)
str b.getsel
;out "text: %s" a
;out "text selected:[]%s" b

t2.getl(b 0)
for i 0 numlines(a)
,t1.getl(a -i)
,inicio=find(t1 t2)
,if(inicio>=0) break
rep(inicio)
,b-" "
remove_text(b inicio 1)
_s.getl(b numlines(b)-1)
ARRAY(str) c=b
for i 0 c.len
,c[i].get(c[i] 0 _s.len)
b=c

out b


Forum Jump:


Users browsing this thread: 1 Guest(s)