Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extending size of Checkbox label?
#1
Hi all... am new around here but have been programming for over 30 years and gotta say I love this program! However I have been writing a complex macro and using the dialog editor and cannot figure out how to make the labels of a checkbox longer! Right now you may be able to get one 8 letter word next to your checkbox... but say for example if I wanted to have checkbox that said "Save file when done?" all that is displayed in the dialog is "Save "... Sure I can check the Multiline, but that don't work either and there is no way to resize the control at all. Any suggestions?
#2
Why cant resize? Just drag it with right mouse button. Or add a static text next to the box.

Function Dialog2
Code:
Copy      Help
;\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

str controls = "3 4"
str c3Sav c4
if(!ShowDialog("Dialog2" &Dialog2 &controls)) ret

;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 223 135 "Dialog"
;3 Button 0x54012003 0x0 12 8 90 10 "Save file when done?"
;4 Button 0x54012003 0x0 12 24 10 10 ""
;5 Static 0x54000000 0x0 24 24 78 10 "Save file when done?"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040003 "*" "" "" ""

ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
#3
easy way to resize a dialog control is to right click on the control in the dialog editor then drag to the size you want while still holding down the right click button.For more dialog hints place the mouse cursor over the question mark icon in the dialog editor.For even more information left click the question mark icon it will open the qm help file
#4
Well I figured it out... the diaalog editor won't let me resize a control (label/checkbox) but by tweaking the code a bit I found that if you change the value of the default value given to something larger it worked fine... eg:

26 Static 0x5400000C 0x0 246 136 48 10 "Save File when done?"

would show

_ Save Fil

By changing the 48 to a 90 it worked.

26 Static 0x5400000C 0x0 246 136 90 10 "Save File when done?"

I don't know why it won't let me resize in XP in the dialog editor, but it won't.

NOTE: I just read the post by Kevin and Magnet and tried it and it worked... thanks guys. That's all I needed to know! Just by holding down the right mouse button and dragging while over a control you can resize. Couldn't figure that out! Sometimes its the simple things that ellude you the most yanno? LOL


Forum Jump:


Users browsing this thread: 1 Guest(s)