Jump to content
Developer Wiki and Function Reference Links ×

Modern Dialog- Hide Edit Text Field


Recommended Posts

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?

Link to comment

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.

Link to comment

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.

Link to comment

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.

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...