TabStop for Listbox
-
Does anyone know how to set TabStop in vb.net 2003. I want to set vbTab(0) = 28 and then vbTab(1) = 3 and so on.
-
Does anyone know how to set TabStop in vb.net 2003. I want to set vbTab(0) = 28 and then vbTab(1) = 3 and so on.
-
Never used it but list box has CustomTabOffsets property which returns a collection of offsets. Perhaps it would help.
The need to optimize rises from a bad design.My articles[^]
Mika - Thanks for the interest to resolve this issue. I used this method below. (Item # from the String format,tab# to stop on the listbox) If (#,-#) that means to list the text on left align and if (#,#) is to list the text on right align. Dim strfmt As String = "{0,-28}{1,-6}{2,-17}{3,-4}{4,-24}{5,-24}{6,-35}{7,-35}{8,-35}{9,10}{10,-8}{11,-10}{12,-6}{13,-3}{14,-35}{15,-7}{16,-3}{17,-35}{18,-6}{19,-5}{20,-67}{21,-35}{22,-216}{23,-6}{24,-6}{25,-6}{26,-6}{27,-6}{28,-6}{29,-6}" For Each dr In dt.Rows() Me.ListBox2.Items.Add(String.Format(strfmt, "", (dr("CB12")), "", (dr("CB13")), "", (dr("CB14")), (dr("CB15")), (dr("CB16")), "", (dr("CB17")), "", (dr("CB18")), "", (dr("CB19")), (dr("CB20")), (dr("cb21")), (dr("CB22")), (dr("Cb23")), "", (dr("cb24")), "", (dr("cb25")), "", (dr("cb26")), (dr("cb27")), (dr("cb28")), (dr("cb29")), (dr("cb30")), (dr("cb31")), (dr("cb32")))) Next
-
Mika - Thanks for the interest to resolve this issue. I used this method below. (Item # from the String format,tab# to stop on the listbox) If (#,-#) that means to list the text on left align and if (#,#) is to list the text on right align. Dim strfmt As String = "{0,-28}{1,-6}{2,-17}{3,-4}{4,-24}{5,-24}{6,-35}{7,-35}{8,-35}{9,10}{10,-8}{11,-10}{12,-6}{13,-3}{14,-35}{15,-7}{16,-3}{17,-35}{18,-6}{19,-5}{20,-67}{21,-35}{22,-216}{23,-6}{24,-6}{25,-6}{26,-6}{27,-6}{28,-6}{29,-6}" For Each dr In dt.Rows() Me.ListBox2.Items.Add(String.Format(strfmt, "", (dr("CB12")), "", (dr("CB13")), "", (dr("CB14")), (dr("CB15")), (dr("CB16")), "", (dr("CB17")), "", (dr("CB18")), "", (dr("CB19")), (dr("CB20")), (dr("cb21")), (dr("CB22")), (dr("Cb23")), "", (dr("cb24")), "", (dr("cb25")), "", (dr("cb26")), (dr("cb27")), (dr("cb28")), (dr("cb29")), (dr("cb30")), (dr("cb31")), (dr("cb32")))) Next
Did you try the CustomTabOffsets and add those tab positions to the collection? I'm just wondering that you have quite a lot of 'columns' you define and use. Could it be possible to use listview instead. I think it would be a lot easier to handle the visualization with that since you can define actual columns in listview and use them.
The need to optimize rises from a bad design.My articles[^]
-
Did you try the CustomTabOffsets and add those tab positions to the collection? I'm just wondering that you have quite a lot of 'columns' you define and use. Could it be possible to use listview instead. I think it would be a lot easier to handle the visualization with that since you can define actual columns in listview and use them.
The need to optimize rises from a bad design.My articles[^]
If you can show me to set the tabbing in the listbox I would appreciate it. Yes I do have a lot of tab stops.