Quote:Mark -
You may be sorry you brought up the width/height issue because now I have a bunch of other questions. I do want to be sure though, that my suggestion to provide for maximizing (using a command) the field editor does not get overlooked in the shuffle. I would also like to be able to open a field editor from another field with something like @fedit(Comments). That way, I would not have to leave the layout element I am in, just to add a comment. When I close the field editor I would still be in the same element.
We haven't overlooked your requests.
Quote:Now, as for width, I did not have a clue that it even existed and I am now curious about its use. Looking at the programming manual, the example given seems to be for @width (except for increasing the element width by 1 pixel which is barely noticeable) ... and the write line tells me the number of pixels when I started and the number of pixels by which I modified it.
Yes, that is wha the example does. It makes the element 1 pixel wider. If you want a more noticeable change, change the 1 to a larger number.
Quote:When I tried the width/height commands, it seems that the element "intrudes" on other elements.
Yes, it gets wider or (in the case of Height) taller. If other elements are there, it will appear over or under them.
Quote:In other words a white screen shows over my form and underneath I still see all the element labels, boxes, etc. Moreover, to type in that element, I need to use the field editor, (which still opens in the regular size).
The behavior depends on the properties of the particualr element and its location on your form in relation to other elements. I'm not sure why you need the field editor to type in the element without seeing the specifics.
Quote:So, now I would like to know some examples of how/why/when width/height commands could be helpful.
To make an element wider/narrower taller/shorter as needed. Here is a simple example which assumes a multiline text box called SizeMe. The code uses Height to expand the text box on entry to show it's entire value. It then resets the size on exit.
** PROGRAMMING SECTION: [ GLOBAL CODE ] [] **
Subroutine SizeThisElement(vWidth as Int, vHeight as Int)
Width(ThisElement, vWidth)
Height(ThisElement, vHeight)
ForceRedraw()
End Subroutine
** PROGRAMMING SECTION: [SizeMe] [On Element Entry] **
var vLen as Int
var vHeight as Int
vLen = @Len(ThisElement)
vHeight = (@Int(vLen / 25) + 1) * 20
SizeThisElement(200, vHeight)
** PROGRAMMING SECTION: [ SizeMe ] [On Element Exit] **
SizeThisElement(200, 20)
Quote:Also, how do I get rid of the new dimensions? Do I have to redefine the size to bring it back to normal. Reading the programming guide, I though that perhaps the forceredraw would bring it back, but it doesn't. It remains (even if I advance to another form) until I close and reopen the file.
The changes to size will persist until you close and reopen the Form. ForceRedraw() redraws the screen withthe curernt settings. It does not reset sizes or colors to original values. If it did, your changes would never appear or stick.