PeterT Posted June 22, 2007 Share Posted June 22, 2007 Is there a way to hide an editable text field in a Modern Dialog using: ShowItem(dialogID, item, FALSE) I cannot seem to make this work on editable text. Quote Link to comment
MullinRJ Posted June 23, 2007 Share Posted June 23, 2007 The example code in the VectorScript Function Reference for ShowItem works on editable text. Have you looked at it? Are you sure you're passing the right dialogID and item numbers? Raymond Quote Link to comment
PeterT Posted June 25, 2007 Author Share Posted June 25, 2007 Thanks Raymond, You made me take another look at my code, and something was not right with my dialogID variable declaration. I had the variable declared twice with slightly different names, once globally, and once in my driver subroutine. By deleting the driver declaration and revising the main declaration name it is now hiding the field as I wanted. I had first settled for just disabling the text, but hiding the field entirly is much better. The next question is whether or not I can make the dialog resize appropriatly when the field is hidden or shown. Is this possible? Quote Link to comment
PeterT Posted June 25, 2007 Author Share Posted June 25, 2007 O.K. I think I found the procedures for resizing the dialog, but the documentation is really lacking on this subject, and I can find no examples of a dialog that resizes. After one calls CreateResizableLayout, are you required to use the SetEdgeBinding procedure. If so, is this procedure call in the Dialog Handler routine, and which items should it be used on, the ones before the item being hidden, or the items after? And how is ResizeDialogC passed to the handler? Any pointers welcome. Quote Link to comment
PeterT Posted June 26, 2007 Author Share Posted June 26, 2007 Now I see I was way off base with my last post. I now realize that CreateResizableLayout is for giving the user control of resizing a dialog on screen. I guess I am back to my original question, can a dialog be set up to resize automatically when a field is hidden? I guess I will look into GetLayoutDialogSize and SetLayoutDialogSize next. Quote Link to comment
MullinRJ Posted June 26, 2007 Share Posted June 26, 2007 Not that I know of. Nor can you move elements after a dialog is defined. In my Reshaper program I have to close the dialog and reopen it with any adjustments that are needed. It's quick, but not imperceptible. If you find a way, please let us know. Raymond Quote Link to comment
Charles Chandler Posted July 1, 2007 Share Posted July 1, 2007 I think Ray is correct here. You CAN use SetLayoutDialogSize to set the size of a resizable dialog, but as I recall, you cannot set it to anything smaller than the smallest size that could fit all of the controls at load time. So you can hide a control, but you're not going to be able to resize the dialog to eat up any space so created. So you'll have to unload and reload the dialog, like Ray says. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.