16 June 2018, 12:53 | #1 |
A1200 040 SAM440EP 667
Join Date: Jan 2008
Location: Lisbon / Portugal
Posts: 873
|
MUICycle
Hi people,
I have a MUIPage layout already constructed inside a MUIWindow and want to make appear/desappear a new MUIString like a kind of MUIInsertSingle / MUIRemoveSingle when a MUICycle gadget is pressed. What is the best way to do this without have to reconstruct the entire page again? Code:
; Set some application properties MUIApplicationTitle "3ncrYptor" MUIApplicationDescription "MUI encrypter/Decrypter program" Statement noRnd{} Make appear a MUIString (like a insert in the page) whithout desconstruct/reconstruct the entire page: MUISet 3,#MUIA_String_Accept,"0123456789" MUIString 4,"",6 MUIAddObjsHGroup 6,0,2,4 MUICreateHGroup 6 MUIAddObjsPage 10,6 End Statement success.l=0 myChoice.l=False cy.l=0 ;NoCli WBStartup FindScreen 0 Dim PageName$(2) PageName$(0)="3ncrYpter" PageName$(1)="d3crypt3r" MUILabel 0,"Generate a random key?",#MUIO_Label_DoubleFrame MUILabel 1,"The option chosen was",#MUIO_Label_DoubleFrame MUICycle 2,"Rnd key","Yes","No" MUIAddObjsHGroup 6,0,2 MUICreateHGroup 6 MUIAddObjsPage 10,6 MUICreatePage 10,"3ncrYpt3r","d3crYpt3r" MUICreateWindow 11,"crYpt3r","PAGE",10 MUIAddSubWindow 11 If MUICreateApplication <> True Then End MUINotifyApp 11,#MUIA_Window_CloseRequest,1,-11 success=MUIOpenWindow (11) Repeat ev.l=MUIWaitEvent Select ev Case myChoice cy=MUIGetCycle (2) ;If cy=1 Then rndKey{} If cy=2 Then noRnd{} End Select Until ev=-11 MUICloseWindow 11 End |
16 June 2018, 13:01 | #2 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
|
The best way to do it is to have the gadget there, but set the #MUIA_ShowMe attribute to False to make it hidden. You can then set it to True (which is 1 for MUI attributes, not -1 like elsewhere) to then make the gadget appear whenever you like, e.g. when the cycle gadget is changed.
|
16 June 2018, 13:29 | #3 |
A1200 040 SAM440EP 667
Join Date: Jan 2008
Location: Lisbon / Portugal
Posts: 873
|
Hi Daedalus,
Thanks for your fast answer Will try the way you said |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
|
|