16.08.2015, 13:31
Hi Daedalus,
Many thanks for your effort in giving me this detailed information with the examples, later I will analyse your examples so I can see if they help me solving my code problem.
I only need 4 entries in each of 2 cycle gadgets I will need, so no problem with that.
Setting up the notify is my problem, I had tried various forms of coding the notify (all with MUINotify instead of MUINotifyApp) but with no luck. The one I choosed was:
It works well at first but give me problems in the selection of the choice of the 2nd cycle gadget
Next I post the code I created so could test the 2 cycle gadgets, if you run it will see that all works well but it never gives the selection in the 2nd cycle gadget:
It will help for sure, again, thanks for your effort.
Many thanks for your effort in giving me this detailed information with the examples, later I will analyse your examples so I can see if they help me solving my code problem.
Daedalus schrieb:For more entries, you need to call the muicycle custom class directly, and that's a little bit more complicated.
I only need 4 entries in each of 2 cycle gadgets I will need, so no problem with that.
Daedalus schrieb:Setting up a notify is no problem, similar to any other gadget but using the cycle gadget specific constant #MUIA_Cycle_Active which you set up to trigger every time the active entry changes. MUINotifyApp works fine here.
Setting up the notify is my problem, I had tried various forms of coding the notify (all with MUINotify instead of MUINotifyApp) but with no luck. The one I choosed was:
Code:
MUINotify 2,#MUIA_Cycle_Active,#MUIV_EveryTime,2,#MUIM_Set,MyChoice
Next I post the code I created so could test the 2 cycle gadgets, if you run it will see that all works well but it never gives the selection in the 2nd cycle gadget:
Code:
WBStartup
Dim PageName$(2)
PageName$(0)="Page 1"
PageName$(1)="Page 2"
MUILabel 0,"MyCycle 1",#MUIO_Label_DoubleFrame
MUILabel 1,"MyCycle 2",#MUIO_Label_DoubleFrame
MUICycle 2,"CyTest 1","CyTest 2","CyTest 3"
MUICycle 3,"CyTest 4","CyTest 5","CyTest 6"
MUISimpleButton 4,"Simple Button A"
MUISimpleButton 5,"Simple Button B"
MUIAddObjsHGroup 6,0,2
MUICreateHGroup 6
MUIAddObjsVGroup 7,6,4
MUICreateVGroup 7
MUIAddObjsHGroup 8,1,3
MUICreateHGroup 8
MUIAddObjsVGroup 9,8,5
MUICreateVGroup 9
MUIAddObjsPage 10,7,9
MUICreatePage 10,"Page 1","Page 2"
MUICreateWindow 11,"MyWin","TEST",10
MUIAddSubWindow 11
If MUICreateApplication <> True Then End
MUINotifyApp 11,#MUIA_Window_CloseRequest,1,-11
MUINotify 2,#MUIA_Cycle_Active,#MUIV_EveryTime,2,#MUIM_Set,MyChoice
MUINotify 3,#MUIA_Cycle_Active,#MUIV_EveryTime,3,#MUIM_Set,MyChoice2
success=MUIOpenWindow (11)
Repeat
ev.l=MUIWaitEvent
Select ev
Case MyChoice
cy=MUIGetCycle (2)
NPrint "MyChoice is CyTest ",cy+1
Case MyChoice2
cy=MUIGetCycle (3)
NPrint "MyChoice is CyTest ",cy+4
End Select
Until ev=-11
MUICloseWindow 11
End
Daedalus schrieb:Hope that helps!
It will help for sure, again, thanks for your effort.