Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Display n multiline texts in edit controls in dialog
#1
Is possible to create a dialog like http://www.notepadtabs.com/ with autosize and autoadjust?
Reply
#2
Try splitter control. It is probably in Archive.qml, Collected QM apps, functions, samples
Reply
#3
Can you show how to create n edit controls and position them at run time?
Reply
#4
Macro dialog splitters and controls created at run time
Code:
Select All      Help
\Dialog_Editor

;Resizable dialog with 2 splitters.
;Controls are created at run time.

str dd=
;BEGIN DIALOG
;0 "" 0x90CF0AC8 0x0 0 0 225 133 "Dialog"
;100 Button 0x54032000 0x0 8 116 72 14 "Create controls"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040500 "*" "" "" ""

if(!ShowDialog(dd &sub.DlgProc 0)) ret


#sub DlgProc
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
,case 100 ;;Create controls
,sub.CreateControls hDlg
ret 1


#sub CreateControls
function hDlg

;3 ListBox 0x54230101 0x200 0 0 96 110 ""
;4 Edit 0x54231044 0x200 100 0 126 70 ""
;5 Edit 0x54230844 0x20000 100 74 126 36 ""
;6 QM_Splitter 0x54000000 0x0 96 0 4 110 ""
;7 QM_Splitter 0x54000000 0x0 100 70 126 4 ""

RECT r; GetClientRect hDlg &r
int wid(r.right) hei(r.bottom*0.8) splitWid(6)
int c3=CreateControl(0 "ListBox" 0 0x54230101 0 0 wid/2-splitWid hei hDlg 3)
int c4=CreateControl(0 "Edit" 0 0x54231044 wid/2 0 wid/2 hei/2-splitWid hDlg 4)
int c5=CreateControl(0x20000 "Edit" 0 0x54230844 wid/2 hei/2 wid/2 hei/2 hDlg 5)
int c6=CreateControl(0 "QM_Splitter" 0 0x54000000 wid/2-splitWid 0 splitWid hei hDlg 6)
int c7=CreateControl(0 "QM_Splitter" 0 0x54000000 wid/2 hei/2-splitWid wid/2 splitWid hDlg 7)

DT_SetAutoSizeControls hDlg "3sv 4sh 5s 6sv 7sh 1m 2m 100mv"
Reply
#5
Thanks, but what I looking for is variable: 'n' edit controls...
Reply
#6
Do you know how view a lot of multiline variables in dialog simultaneously or view Qmgrid cells expanded simultaneously?
Reply
#7
I would do like in the above example, perhaps with an array of control handles.
Reply
#8
Can you show an example using Qmgrid cells expanded?
Reply
#9
QM grid cannot have multiple cells in edit mode.
Reply
#10
Is possible some like this https://www.codeproject.com/Articles/15 ... st-Control in QM?
Reply
#11
I think no. It is only for C++. Unless it can be easily compiled to dll that exports dll functions that can be used in QM. But easier would be a COM control (ActiveX).
From my experience, such old codeproject controls often have many many problems.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)