diff options
Diffstat (limited to 'iup/src/iup_tabs.c')
-rwxr-xr-x | iup/src/iup_tabs.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/iup/src/iup_tabs.c b/iup/src/iup_tabs.c index 77b2cf5..2907371 100755 --- a/iup/src/iup_tabs.c +++ b/iup/src/iup_tabs.c @@ -307,6 +307,25 @@ static char* iTabsGetClientSizeAttrib(Ihandle* ih) return str; } +void iupTabsTestRemoveTab(Ihandle* ih, int pos) +{ + int cur_pos = iupdrvTabsGetCurrentTab(ih); + if (cur_pos == pos) + { + if (cur_pos == 0) + { + Ihandle* child = IupGetChild(ih, 1); + if (!child) /* not found child, means only one child, do nothing */ + return; + + cur_pos = 1; + } + else + cur_pos--; + + iupdrvTabsSetCurrentTab(ih, cur_pos); + } +} /* ------------------------------------------------------------------------- */ /* TABS - Methods */ |