c# - Anchor style of controls in dynamic panel is not working -


i have dynamic panel autosize prperty true , want resize control contains if form maximized/minimized. intially when panel added runtime has 3 controls. button on left (action_button) , text box (newproject_box) in middle , again button (expand_button) on right.

when button(expand_button) on right clicked ,the new controls added -label 'note' , 'tag', datetimepicker 'start_calender , 'due_calender' , labels 'start_label' , 'du_label'.

when 'note' , 'tag' clicked, text boxes appeared in there places

these properties setting.

action_button.anchor = (anchorstyles.left | anchorstyles.top);         newproject_box.anchor=(anchorstyles.left | anchorstyles.right);         expand_button.anchor = (anchorstyles.right | anchorstyles.top);         collapse_button.anchor = anchorstyles.right;         note_label.anchor = anchorstyles.left;         note_box.anchor=(anchorstyles.left| anchorstyles.right);         start_calender.anchor = anchorstyles.left;         due_calender.anchor = anchorstyles.left;         start_label.anchor = anchorstyles.left;         due_label.anchor = anchorstyles.left;         tag_label.anchor = anchorstyles.left;         tag_box.anchor=(anchorstyles.left | anchorstyles.right); 

with above settings, newproject_box , expand_button disappearing. dynamic panels , controls contains not adjusting if maximize form. please guide,how can achieve that.

these panel properties. let me know if other information needed (i don't have reputation add images)

p1.backcolor = color.beige;         p1.autosize = true;         p1.autosizemode = autosizemode.growandshrink;          p1.anchor = (anchorstyles.right | anchorstyles.left); 


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -