Resizing Controls
Posted: Thu Dec 19, 2013 11:00 pm
To All
I am trying to calculate the controls on a parent dialog when the user RESIZES the screen. I have no problems resizing folders and xBrowse .. I just can not seem to be able to calculate the proper movement of a BtnBmp.
What happens is I lose the caption and the button does not move .. please review my code and tell me what I am doing wrong... aControls[56] is the correct control .. note the loss of the caption in the second screen shot.
Rick Lipkin
Starting to resize screen
notice the Close button
I am trying to calculate the controls on a parent dialog when the user RESIZES the screen. I have no problems resizing folders and xBrowse .. I just can not seem to be able to calculate the proper movement of a BtnBmp.
What happens is I lose the caption and the button does not move .. please review my code and tell me what I am doing wrong... aControls[56] is the correct control .. note the loss of the caption in the second screen shot.
Rick Lipkin
Starting to resize screen
notice the Close button
- Code: Select all Expand view
Static Func _ResizeControls( nSizeType, nWidth, nHeight, oGrps,oFld )
if nSizeType = 0 //SIZE_MAXIMIZED
* xbrowse( oGrps:aControls ) // 37 247
* xbrowse( oFld:aDialogs[1]:aControls )
* xbrowse( oFld:aDialogs[1]:aControls[6] )
* xbrowse( oFld:aDialogs )
// 340
oGrps:aControls[1 ]:SetSize( nWidth - 372, nHeight - 290 ) //folder
oFld:aDialogs[1]:SetSize( nWidth - 372, nHeight - 290 ) // dialog1
oFld:aDialogs[1]:aControls[1]:SetSize( , nHeight - 340 ) // ad campaign
oFld:aDialogs[1]:aControls[6]:SetSize( nWidth - 600, nHeight - 370 ) // publications
* oGrps:aControls[58]:SetSize( nWidth - 372, nHeight - 340 ) //delete
* oGrps:aControls[57]:SetSize( nWidth - 372, nHeight - 340 ) //save edit
* oGrps:aControls[54]:SetSize( nWidth - 372, nHeight - 340 ) //save new
* oGrps:aControls[55]:SetSize( nWidth - 372, nHeight - 340 ) //add new
oGrps:aControls[56]:SetSize( , nHeight - 100 ) //close <---- here
* oFld:aDialogs[1]:SetSize( nWidth - 372, nHeight - 340 ) // ad campaign
* oFld:aDialogs[1]:aControls[6]:SetSize( nWidth - 372, nHeight - 340 ) // ad publications
endif
Return(nil)