Stupidity of Tabbers
BlitzMax Forums/MaxGUI Module/Stupidity of Tabbers
| ||
First, I must say Im relatively new To MaxGUI But its no reason for the fact that I had to break my head in order to get along with the Tabbers mechanism I used other GUI's before and never encountered such a none elegant approach. First, when Adding a new tab to a tabber, instead of getting a Handle, you must also Create a darn Panel.. Now, even worse then that about the Tabbers mechanism is that you have to build your own system for hiding unselected Tabs items. I dont know what to say.. Have I missed something? |
| ||
No, you havent missed antything. MaxGUIs design is more or less mirrored with OS controls. And its only abstractions are Gadgets and GadgetItems, the latter only accessed by an index. And they both keep most of their state in those OS controls. In the case of the Tabber, the OS control cant have children either so thats what MaxGUI does. I believe MaxGUI was initially designed with respect to how Windows does GUIs. Its kinda the lowest common denominator nowadays ;) |
| ||
I am proud to declare that MaxGui is the stupidest Gui Ive ever Encountered.. Congrats! |
| ||
Well, maybe CreateTabber() is quite 'simple', but once you understand the logic, it works well. The 'good' thing about MaxGUI is that it's written to be modular: you can (as me) create proxygadgets to bypass these limits.. so I wrote my own CreateTabberManager() that allows to Add a panel (with AddGadgetItem), Enable/Disable it etc ps: I'm proud to say that MaxGUI is one of the most useful modules written to handle a OS-GUI (with all the limits imposed by three different OSs)... |
| ||
There's some misunderstanding on what to expect from CreateTabber. It gives you a tab bar gadget (something that displays tab buttons), that's it. It doesn't manage the tab pages for you. For that you need to write a composite gadget, something that reacts to the tab bar events and changes the pages accordingly. For inspiration: http://doc.qt.io/qt-5/qtabwidget.html#details |
| ||
It doesn't manage the tab pages for you. Indeed. It's a bit crap in that regard - but I understand how it came to be, since that is how it works on Win32. Other toolkits function more naturally - i.e. they do all the crap work for you. It certainly makes wrapping a toolkit for MaxGUI a pain in the arse as you essentially have to toss out all the nice working stuff so that the user gets the appearance of managing the pages themselves... good grief... |
| ||
If it was only that Brucey then ok.. but for example today I tried to get the selected text from a Listbox.. for that I had to break my head for an hour.. I find my self many times make my own simplified functions to get things more clear.. + they dont mention anything about that on the manual of Maxgui on the website. Once you get maxgui off course its all become easy For reading from a list box I have done Return GadgetItemText(ItemsList, SelectedGadgetItem(ItemsList)) For changing Tabs.. I had to make my own loop which constantly run on background. Maybe its not the best way. but thats what Currently using. Degac.. Im only letting off steam.. I dont really mean it. for the record. Allow me to use this post for a little Question.. When you expand a TreeView it also being read by the SelectedTreeViewNode function as if I selected an Item. is there any way to avoid the selection of a treeviewItem and just expand the tree? |
| ||
Have you tried ExpandTreeViewNode? According to the manual you simply pass it the name of the node you want to expand. You can collapse it the same way using CollapseTreeViewNode. |
| ||
@Hardcoal I understand...I was ironic ;) There are so many little things I would like to see in MaxGUI, like having textfield with alignment on the right for example, or changing the alignment of a text gadget (label or other) AFTER it is created. They are very annoying limits I know, but a single change (like the text alignment) is quite a complicated things under the hood! I really doubt that nowadays anyone would put in front of a keyboard to write a such module considering the total complexity! It's faster to use a pre-done solution (like QT or wxWidget) The main advantage of MaxGUI it's the small size of the .exe. |
| ||
Im already getting used to it and ive made my own extra functions to make things easy.. I got a Tabbing system which work as I please.. And all the issues Ive mentioned have being resolved by extra functions. Though Im sure i will encounter more stupidity/hard times.. on my future path.. I want to concentrate on my mission rather then handle GUI issues.. and when I spend an hour or so for some nonsense which suppose to be simple, It makes me loose it. The funny thing is that sometimes it seems like im the only one who encounter such problem because before I post, I do a Search to find answers for my Issue.. but it seems like everyone knows what to do rather then me :p |