English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. Blitz Basic

 
 
Thread Tools
Old 16 June 2018, 12:53   #1
AlfaRomeo
A1200 040 SAM440EP 667
 
AlfaRomeo's Avatar
 
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
AlfaRomeo is offline  
Old 16 June 2018, 13:01   #2
Daedalus
Registered User
 
Daedalus's Avatar
 
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.
Daedalus is online now  
Old 16 June 2018, 13:29   #3
AlfaRomeo
A1200 040 SAM440EP 667
 
AlfaRomeo's Avatar
 
Join Date: Jan 2008
Location: Lisbon / Portugal
Posts: 873
Hi Daedalus,
Thanks for your fast answer

Will try the way you said
AlfaRomeo is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 17:54.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.06948 seconds with 14 queries