#Region alignment

3 posts, 0 answers
  1. Massimiliano
    Massimiliano avatar
    184 posts
    Member since:
    Oct 2012

    Posted 08 Jan 2014 Link to this post

    Is there a way to customize alignment for regions?
    I'm coding in vb.net and to better find even at a glance regions I usually keep it at the border like that

    #Region "Form validation"
            Protected Sub ValidateExistingUserName(ByVal source As Object, ByVal args As ServerValidateEventArgs)
                Dim userId As Integer = Convert.ToInt32(EvaForm.DataKey("UserId"))
      
                args.IsValid = Me.Validator.UserNameIsFree(args.Value, userId)
            End Sub
    ....

    But when I format code I have them aligned like that:

            #Region "Form validation"
            Protected Sub ValidateExistingUserName(ByVal source As Object, ByVal args As ServerValidateEventArgs)
                Dim userId As Integer = Convert.ToInt32(EvaForm.DataKey("UserId"))
     
                args.IsValid = Me.Validator.UserNameIsFree(args.Value, userId)
            End Sub
    ....

    Wich makes really hard for me to spot them.
    Or an alternative would be to modify the appearence (like for example having an inverted background/foreground for the region statement line)

    Thanks


  2. Zdravko
    Admin
    Zdravko avatar
    657 posts

    Posted 09 Jan 2014 Link to this post

    Hi Massimiliano,

    Unfortunately, there isn't a setting that performs such indentation in JustCode.
    We are open to new suggestion form the users so I would recommend posting a feature request at our feedback portal.

    I could find a way to change the color of the regions through VS settings, but it is achievable in C# and not in VB.
    Thanks.

    Regards,
    Zdravko
    Telerik
    Share what you think about JustCode with us, so we can help you even better! You can use the built-in feedback tool inside JustCode, our forum, or our JustCode feedback portal.
  3. DevCraft banner
  4. Massimiliano
    Massimiliano avatar
    184 posts
    Member since:
    Oct 2012

    Posted 09 Jan 2014 Link to this post

    It would be nice to have some kind of formatting control over #region statements be it just color scheme or indendation.
    I'm using VB. Tryed to change something in VS font and colors for Preprocessor Keywords but with no luck
    This is a common thing in other softwares like audio DAW, or video software (to have region markers and be ablo to customize the appearence).
    Without proper individuation in the code #region loses much of it's utility in my opinion.

    Will open a feature request. thanks
Back to Top