Plex 2E

  • 1.  Can an Edit Box(Text field ) be resizable at run-time?

    Posted Jun 12, 2015 02:52 AM

    Can an Edit Box(Text field ) be resizable at run-time?

    For example if a field length is about 3000chars and we made it fix to 100chars per line and height is 3. So, user can see 300 chars at one go. If user is entering more than 300 chars then field should streachable/increase inorder to allow user to see whole text/message entered ?

     

    I am aware of vertical scroll bar property which is used to see whole text by scrolling down but user needs whole text to be displayed at runtime.



  • 2.  Re: Can an Edit Box(Text field ) be resizable at run-time?
    Best Answer

    Posted Jun 15, 2015 10:02 AM

    yes sure see plex help  for Source code: WINAPI/SetControlSize

     

    {

      HWND hWnd = ObPanelAPI::GetControlHandleByName( &(1:) );

    ::SetWindowPos( hWnd, NULL, 0, 0, &(2:), &(3:),

                      SWP_NOMOVE|SWP_NOREPOSITION|SWP_NOZORDER );

     

    }

     

    Note:

    • you could call Source code: WINAPI/GetControlSize  to find out current size
    • Scroll Bars = NONE
    • Scrolling = Vertical

     

     

    To find out the height required you could do some guess work by getting text length and division or more accutately you have to GetTextExtentPoint32  and   GetTextMetrics

    See StellaTools.Abstract.OBJECTS.Msc.GetTextExtentPoint32



  • 3.  Re: Can an Edit Box(Text field ) be resizable at run-time?

    Posted Jun 16, 2015 08:52 AM

    Should this not be in the Plex forum rather than 2E?



  • 4.  Re: Can an Edit Box(Text field ) be resizable at run-time?

    Posted Jun 16, 2015 10:03 AM

    There is no 2E forum. Just assigned "categories" when a post is made. I've already moaned about this, so won't bother again...



  • 5.  Re: Can an Edit Box(Text field ) be resizable at run-time?

    Posted Jun 16, 2015 11:06 AM

    Ok I used wrong terminology ...so shouldn't the category be Plex instead of 2E so that when I select to display category 2E I would not have to see this discussion?  I don't remember...is selecting a category mandatory when creating a discussion?  If not, shouldn't it be?  And is there a way to edit the category on a discussion?



  • 6.  Re: Can an Edit Box(Text field ) be resizable at run-time?

    Posted Jun 16, 2015 01:20 PM

    The category isn't 2E, it's both, but I digress.

     

    Selecting a category wasn't mandatory for me...

     

    I imagine that the OP can change their OP...



  • 7.  Re: Can an Edit Box(Text field ) be resizable at run-time?

    Posted Jun 17, 2015 01:12 AM

    Thank you for the response George!