Posts: 125
Threads: 20
Joined: Jan 2021
hello everyone,
In the following example, I want to use tab to align characters, But it No effect,
Does anyone know what the problem is? Thanks in advance
Macro
Macro4
_s=
;ke-48=text0
;cm-291=text6
;win-26=test8
;wib-262=test7
;ww-28=test4
ARRAY(str) a=_s
for int'i 0 numlines(_s)
,a[i].findreplace("-" "[9]")
,a[i].findreplace("=" "[9]")
,out a[i]
str s=a
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog" "4"
;3 ComboBox 0x54230641 0x0 12 8 96 114 ""
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040A00 "*" "" "" ""
str controls = "3"
str cb3
cb3=s
if(!ShowDialog(dd 0 &controls)) ret
Posts: 12,086
Threads: 142
Joined: Dec 2002
Combo box does not support it. Unless you custom draw, but it is not so easy.
WPF combo box supports tabs and multiple lines.
Example in QM3:
var b = new AWpfBuilder("Window").WinSize(400);
b.R.Add("Combo", out ComboBox combo1).Items("Zero|\tOne|T\nwo");
b.End();
if (!b.ShowDialog()) return;
Posts: 125
Threads: 20
Joined: Jan 2021
Thanks for your advice. I found a small problem
Control information is hidden. It's not convenient to use the mouse wheel. I can only change the height
recommended to display the control information in two columns. The second column displays the control information, which is consistent with qm2
In addition, pressing Alt + F8 not output the details
Posts: 12,086
Threads: 142
Joined: Dec 2002
In next QM3 version, mouse info will be in 3 lines. Or 4-5 when wraps lines.
Alt+F8 probably will not be added. To copy text: click, move the mouse somewhere, press Ctrl+A+C.
Posts: 125
Threads: 20
Joined: Jan 2021
01-14-2021, 11:16 PM
(This post was last modified: 01-14-2021, 11:18 PM by macman.)
@
Gintaras
Alt+F8 probably will not be added. To copy text: click, move the mouse somewhere, press Ctrl+A+C.
__________________________________________________________________________________________
It can't be realized. In qm2, ALT + F8 can be implemented
because, When I move the mouse, the information of the control and window has changed
Or need other operations?
Posts: 125
Threads: 20
Joined: Jan 2021
01-15-2021, 01:44 AM
(This post was last modified: 01-15-2021, 02:03 AM by macman.)
I want to use underscores, realization similar Tab alignment effect
This needs to determine the number of letters and numbers
control the number of underscores
What functions need to use?
Or is there any other similar solution? Any suggestions are welcome. Thanks in advance
I can use the following method(Add space) to achieve the effect of alignment in JAVA
How to realize it in qm2?
System.out.printf("%10s%10s%10s",s1,s2,s3);
Macro
add tab
s=
;ke-48=text0
;cm-291=text6
;win-26=test8
;wib-262=test7
;ww-28=test4
ARRAY(str) a=_s
for int'i 0 numlines(_s)
,a[i].findreplace("-" "__")
,a[i].findreplace("=" "__")
,out a[i]
str s=a
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog" "4"
;3 ComboBox 0x54230641 0x0 12 8 96 114 ""
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040A00 "*" "" "" ""
str controls = "3"
str cb3
cb3=s
if(!ShowDialog(dd 0 &controls)) ret
Posts: 12,086
Threads: 142
Joined: Dec 2002
Quote:When I move the mouse, the information of the control and window has changed
1. Click the Info panel. Now QM3 window is active, and the Info panel is focused, with caret.
2. Move the mouse to the object and stop.
3. Ctrl+A+C.
Posts: 12,086
Threads: 142
Joined: Dec 2002
Macro
Macro3099
str s1="one"
str s2="two"
str s3="three"
str s.format("%10s%10s%10s",s1,s2,s3)
out s