Ooops
August 10, 2020, 11:22:54 PM

Author Topic: Any MaxGUI turtorials out there?  (Read 823 times)

Offline Juiceter

  • Jr. Member
  • **
  • Posts: 52
Re: Any MaxGUI turtorials out there?
« Reply #15 on: June 13, 2020, 07:33:37 PM »
After exploring it a bit this works fine for me (3 textfields). Hope it helps someone else! It seems that 2 events are posted on an Enter key (that's what it looks like to me anyway). Tabs AND Enters through fine.

Code: [Select]
' TABBING or RETURNING THROUGH TEXTFIELDS WITHOUT A BOUNCE from the 2nd text field.
' Note: no OK button needed.

Strict
Import MaxGui.Drivers

Global window:Tgadget=CreateWindow("Window",0,0,320,200)
Global g:Tgadget=CreateTextField(10,10,30,25,window)
Global g1:Tgadget=CreateTextField(10,50,30,25,window)
Global g2:Tgadget=CreateTextField(10,80,30,25,window)

ActivateGadget g
While WaitEvent()
Print CurrentEvent.ToString()
Select EventID()
Case EVENT_GADGETLOSTFOCUS
Select EventSource() 
Case g
ActivateGadget g1 ; WaitEvent ; ActivateGadget g1 ' -> Enter seems to produce 2 events! This clears the 2nd.
Case g1
ActivateGadget g2 ; WaitEvent ; ActivateGadget g2
                Case g2 Exit
         End Select

Case EVENT_WINDOWCLOSE End
End Select
Wend

Print "g="+TextFieldText$(g)
        Print "g1="+TextFieldText$(g1)
Print "g2="+TextFieldText$(g2)


Offline Henri

  • Sr. Member
  • ****
  • Posts: 250
Re: Any MaxGUI turtorials out there?
« Reply #16 on: June 14, 2020, 06:07:15 PM »
I created an issue here https://github.com/bmx-ng/maxgui.mod/issues/46 to get some attention to this behavior and proposed some fixes.

-Henri
- Got 01100011 problems, but the bit ain't 00000001

Offline Juiceter

  • Jr. Member
  • **
  • Posts: 52
Re: Any MaxGUI turtorials out there?
« Reply #17 on: June 14, 2020, 09:39:26 PM »
Thanks Henri. With that small fix it seems to be working fine now, so I suppose having it changed would mess everyone up I guess! The problem is that somewhere down the line you just know it's going to cause someone else a problem though.

Offline Yellownakji

  • Sr. Member
  • ****
  • Posts: 253
  • No.
Re: Any MaxGUI turtorials out there?
« Reply #18 on: June 18, 2020, 07:34:59 PM »
MaxGUI is junk;  I ditched it long ago and for good reason.

Can't help, but thinking about it makes me shudder.

Hi,

can anyone point me in the direction of a decent blitz maxGUI tutorial please?

I've gone through Assari's (2005) one which is pretty good but it doesn't tell me enough about events and why the dreaded return key is not picked up in textfield gadgets.

In particular I'm having a lot of trouble with EVENT_GADGETLOSTFOCUS and trapping the return key so i can act on it (perhaps disable it so I can tab between textfields instead).

EDIT: anyone know if  Slone's "blitzmax for absolute beginners" covers the GUI portion of blitz max? Has anyone read it? Is it any good?

Thanks!

Offline Juiceter

  • Jr. Member
  • **
  • Posts: 52
Re: Any MaxGUI turtorials out there?
« Reply #19 on: June 19, 2020, 02:54:03 AM »
Oh it's actually not so bad! I haven't come across many issues with it. This was one of them, but it was fixed with a little help and thought. Blitz GUI is actually quite old now so I guess if you are comparing it with something more modern then yes, it may look a bit old-fashioned.

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal