MikeH Well-Known Member Licensed User Longtime User Jan 31, 2013 #1 If there isn`t already a simple method, (I have looked), could the MsgBox2 function have the option to center text? It would make my coding a lot easier, instead of padding out with spaces for each eventuality. Maybe someone will tell me there is already a way, I would be happy with that too Thank you!
If there isn`t already a simple method, (I have looked), could the MsgBox2 function have the option to center text? It would make my coding a lot easier, instead of padding out with spaces for each eventuality. Maybe someone will tell me there is already a way, I would be happy with that too Thank you!
M Mahares Expert Licensed User Longtime User Feb 1, 2013 #2 Check out NJDude's custom msgbox class in the following link. I am pretty sure it will do what you want: http://www.b4x.com/forum/additional...tes/23041-class-custom-msgbox.html#post133618 If you want to center the msgbox text there, add the line below to the CLASS module sub: Public Sub ShowMessage(BoxMessage As String) Code: Copy Public Sub ShowMessage(BoxMessage As String) Dim su As StringUtils Message.Text = BoxMessage Message.Gravity=Gravity.CENTER_HORIZONTAL 'Add this line Mahares
Check out NJDude's custom msgbox class in the following link. I am pretty sure it will do what you want: http://www.b4x.com/forum/additional...tes/23041-class-custom-msgbox.html#post133618 If you want to center the msgbox text there, add the line below to the CLASS module sub: Public Sub ShowMessage(BoxMessage As String) Code: Copy Public Sub ShowMessage(BoxMessage As String) Dim su As StringUtils Message.Text = BoxMessage Message.Gravity=Gravity.CENTER_HORIZONTAL 'Add this line Mahares
MikeH Well-Known Member Licensed User Longtime User Feb 4, 2013 #3 Thank you Mahares, I will try that. Erel, is it possible, in a future release, that the msgbox2 could have a Boolean option to say centered or not?
Thank you Mahares, I will try that. Erel, is it possible, in a future release, that the msgbox2 could have a Boolean option to say centered or not?
NJDude Expert Licensed User Longtime User Feb 15, 2013 #4 I have updated the CustomMsgBox class to allow centering, see HERE