vb.net - Improving the arrangement and layout of my listbox -


i'm having trouble visual basic. i'm trying make listbox this:

enter image description here

however ends this:

enter image description here

is there way can organise data? also, how can make total number of universities fixed @ bottom , "university name" "abbreviation"at top? how add vertical scroll bar? also, how can calculate total number of students @ bottom?

this code:

private sub piclist_click(byval sender system.object, byval e system.eventargs) handles piclist.click     frmlist.show()     frmlist.lstshow.items.clear()     dim fmtstr string = "{0,-0}{1,-20}{2,-15}{3,-20}{4,-25}"     dim integer     frmlist.lstshow.items         .add(string.format(fmtstr, "university name", "abbreviation", "state", "accredited year", "total students"))           = 0 n - 1             .add(string.format(fmtstr, names(a), abbreviation(a), state(a), accredited(a), total(a)))         next         .add(string.format(fmtstr, "", "", "", "", ""))         .add("total of " & n & " universities.")     end end sub 

to honest: wouldn't use listbox issue. easier use datagridview , labels display totals. if use dgv write function sums values in column "total students" , displays value in specific label.

anyway, add vertical scrollbar need give listbox fixed size (autosize= false) , autoscroll=true in gui editor.


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -