diff --git a/src/widget/listbox.c b/src/widget/listbox.c index 23e5dd0..448efa0 100644 --- a/src/widget/listbox.c +++ b/src/widget/listbox.c @@ -307,6 +307,9 @@ static int create(MwWidget handle) { MwSetDefault(handle); + MwSetInteger(handle, MwNleftPadding, 0); + MwSetInteger(handle, MwNhasHeading, 0); + resize(handle); lb->list = NULL; lb->selected = -1; @@ -314,9 +317,6 @@ static int create(MwWidget handle) { lb->width = NULL; lb->changed = 0; - MwSetInteger(handle, MwNleftPadding, 0); - MwSetInteger(handle, MwNhasHeading, 0); - return 0; }