c# flowlayout overlapping of listbox and button -
i'm having this:
class mypanel : flowlayoutpanel { public mypanel() { this.backcolor = color.red; this.flowdirection = system.windows.forms.flowdirection.lefttoright; listbox = new listbox(); editbutton = new button(); //editbutton.click += editbutton_click; this.controls.add(listbox); this.controls.add(editbutton); } }
and i'm adding form dynamically. problem listbox overlapping button. if try add there 2 buttons instead of list working supposed - buttons organized in 1 line left right. want reach button next list. can advice me? thanks
try code:
class mypanel : flowlayoutpanel { public mypanel() { this.backcolor = color.red; this.flowdirection = system.windows.forms.flowdirection.lefttoright; listbox = new listbox(); this.wrapcontents = false; // use control not wrapped editbutton = new button(); this.controls.add(listbox); this.controls.add(editbutton); } }
Comments
Post a Comment