ScriptSpot

Forum topic · General Scripting

tab ui make problem

By dussla · 2018-06-28

Description

hello ~ pls still i need help
i seen this code

but i can;t add submenu

i would like to add menu each tab

checkbox chk_box "Checkbox" in geraltab

checkbox chk_box "Checkbox" in Security

but what problem ~~

(

rollout General "General"
(
checkbox chk_box "Checkbox"
)

try(destroyDialog ControllingTheTabControlSample)catch()
rollout ControllingTheTabControlSample"ControllingTheTabControlSample" width:1200
(

dotNetControl tabs "system.windows.forms.tabControl" width:(ControllingTheTabControlSample.width-30) height:30
subRollout subRoll "Sub" width:(ControllingTheTabControlSample.width-30) height:200 offset:[0,-5]

fn initTabs tab labels:#() =
(
tab.tabPages.clear()
tab.sizeMode=tab.sizeMode.fixed
tab.itemSize=dotnetObject "System.Drawing.Size" ((tab.width/labels.count)-2) 30
for x in labels do tab.tabPages.add x
)

on ControllingTheTabControlSample open do
(
initTabs tabs labels:#("General", "Security", "Details", "yy")
)

)
createDialog ControllingTheTabControlSample

)

Comments (3)

Maybe

TsveTan · 2018-06-29

you need to replace

fn initTabs tab labels:#() =

with

fn initTabs tab labels =

wow thank you

dussla · 2018-07-01

Good reference
Really relly thank you
Always thank you