Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
set grid button name and button in each cell of a column
#1
How can I set the text of an button within a grid?

I took the example code from the helpfile

Function Dialog90
Code:
Copy      Help
\Dialog_Editor

str controls = "3"
str qmg3x
qmg3x=
;<0>edit,test_abc
;<1>combo,x
;<2>check,Yes
;<7>read-only,x
;<8>edit multiline,x
;<9>combo sorted,x
;<20>edit+button,x
;<23>read-only edit + button,test
;
if(!ShowDialog("Dialog90" 0 &controls)) ret
out qmg3x

;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 223 135 "Dialog"
;3 QM_Grid 0x54070000 0x0 0 0 224 110 "0x7,0,0,2,0x10008848[]A,,,[]B,,,"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2030604 "*" "" "" ""

QUESTION 1
How can I set the label of the button in the final row <23>read-only edit + button,test
It now shows a smal rectangulair empty grey button.
I can set the text of an interface item with SetDlgItemText, but I can't get it to set the text of a button within a QM grid.

QUESTION 2
Is it possible to show a button in each column cell without having the user to click on the cell first?
Something like this (where the button is immediatly visible)

Code:
Copy      Help
column 1 |  column 2
______________________
profile 1 | [RUN BUTTON]
profile 2 | [RUN BUTTON]
profile 3 | [RUN BUTTON]
#2
2. No. Try Check control.

1. I don't remember but probably the button has style where text cannot be displayed, only icon.
#3
Ok thank you!!


Forum Jump:


Users browsing this thread: 3 Guest(s)