Menu

#847 Limit field number in wxsstatusbar

Next_Release
applied
wxSmith (64)
Patch
2019-07-04
2019-07-03
No

The Fields property in wxsstatusbar (the wxStatusBar in wxSmith) is not limited, and the code blindly creates the specified number of fields in the property grid and in user code. I created yesterday 11111 fields in a mistake.

This patch limits the number of fields in the status bar to a reasonable amount (I think even 30 is way too much).

1 Attachments

Discussion

  • sodev

    sodev - 2019-07-03

    I'm strongly against this, don't impose artifical limitations without technical reasons. I have a 4K screen, i can easily fit 200 status fields on it which display a small icon, 2 letter code, or whatever. Will i ever have the need to do that? I have no idea. But maybe someone else has ideas, who knows.

    Does it crash if you add more than max short? Or max int? Place a limit on that then. But otherwise, let the user pick what he wants.

     
  • Miguel Gimenez

    Miguel Gimenez - 2019-07-03

    I can understand 200 status fields generated with code, but it is hard to understand using wxSmith for that.

    Anyway, status bar in Windows are limited to 256 fields:

    https://docs.microsoft.com/en-us/windows/desktop/controls/status-bars

    A status bar can have a maximum of 256 parts, although applications typically use far fewer than that.

    Don't know about GTK, but even for a 4K monitor more than 500 items is ludicrous.

     
  • sodev

    sodev - 2019-07-03

    There you have your technical limit you can enforce ;o)

     
  • Miguel Gimenez

    Miguel Gimenez - 2019-07-03

    Modified patch with a 256 field limit and a comment explaining the rationale. If anybody knows about GTK limitations please report.

     
  • Teodor Petrov

    Teodor Petrov - 2019-07-04
    • status: open --> applied
    • assigned_to: Teodor Petrov
     

Log in to post a comment.

MongoDB Logo MongoDB