We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2023-04-14 11:07 AM - last edited on 2023-04-16 05:52 AM by Laszlo Nagy
13. Graphical User Interface | GRAPHISOFT GDL Center
How to set up tabpage navigation in UI? | GRAPHISOFT GDL Center
! place the following control on every displayed page
!!! ui_current_page gs_ui_current_page
!!! ui_page gs_ui_current_page
! control popup for paging
!!! ui_infield{4} "gs_ui_current_page", 0, 0, 350, 25,
!!! 2, "",
!!! 0, 0,
!!! 30, 20, 30, 20,
!!! tabIcons, tabTitles, tabIDs
! go to next-previous page buttons
!!! ui_button ui_prev, " << ", 350+10, 2, 32,21, gs_ui_current_page - 1
!!! ui_button ui_next, " >> ", 350+10+37, 2, 32,21, gs_ui_current_page + 1
2023-04-14 12:47 PM - edited 2023-04-14 01:11 PM
1. My mistake was not creating the gs_ui_current_page (integer) parameter.
2. in parameter Script
If "hideparameter all" is not executed, the following state is always maintained. You must run it to go to the page you were editing.
3. Pages are not visible unless Hierarchical pages is turned on.
TABID_ROOT = -1
_idxTab = 1
TABID_DIMENSIONS = _idxTab : _idxTab = _idxTab + 1
TABID_2DREPRESENTATION = _idxTab : _idxTab = _idxTab + 1
TABID_3DREPRESENTATION = _idxTab : _idxTab = _idxTab + 1
! set the title of the UI area popup
ui_dialog `My custom object settings`
! set the parameter "gs_ui_current_page" for actual page display
ui_current_page gs_ui_current_page
! ------------------------------------------------------------------------
! Display actual tabpages using extended ui_page command
! ------------------------------------------------------------------------
ui_page TABID_DIMENSIONS, TABID_ROOT, `Dimensions`
gosub "pageDimensions"
ui_page TABID_2DREPRESENTATION, TABID_ROOT, `2D Representation`
gosub "page2D"
ui_page TABID_3DREPRESENTATION, TABID_ROOT, `3D Representation and Surfaces`
gosub "page3D"
! ------------------------------------------------------------------------
end
! ------------------------------------------------------------------------
"pageDimensions":
!!! tabIcons, tabTitles, tabIDs
!!! go to next-previous page buttons
ui_button ui_prev, " << ", 350+10, 2, 32,21, gs_ui_current_page - 1
ui_button ui_next, " >> ", 350+10+37, 2, 32,21, gs_ui_current_page + 1
! page content script
return
"page2D":
! page content script
return
"page3D":
! page content script
return
! control popup for paging
!!! ui_infield{4} "gs_ui_current_page", 0, 0, 350, 25,
!!! 2, "",
!!! 0, 0,
!!! 30, 20, 30, 20,
!!! tabIcons, tabTitles, tabIDs
I need to study this part more.^^
Because I am a beginner
If I could have deleted it, I would not have written this post like this....