Hide header or menu when on iOS?
Posted 08 February 2012 - 10:09 AM
Is there any way of scripting so that the header, or title header don't display on iOS units?
I have a menu in the header, and it is not needed on the iPad version because the built in navigation is so good. Kind of wish they would make a bigger and nicer menu in the normal osx fm pro as well. Any how how do you guys solve it with unit dependent graphics?
Posted 11 February 2012 - 01:55 AM
"unit dependent graphics". Do you mean that certain pictures or graphics on a layout should only be visible when running on the desktop, iPad or iPhone? You can use Get (SystemPlatform). It will retune a "3" when it's an iPad and a "4" when it's an iPhone. You can use this information in scripts, or set a global variable with it and use it in calculations, triggers, etc.
Posted 11 February 2012 - 08:31 AM
It's common to create a different group of layouts for each interface: iPad, iPhone/iPod, Desktop, IWP. Then, in the start-up script, test the application version, and go to the appropriate starting layout for the current interface.
Any how how do you guys solve it with unit dependent graphics?
Posted 13 February 2012 - 01:32 AM
Ive got a layout that works on both iPad and iMacs (since I think its to much work building individual layouts for every system in this project). But the only thing I could not manage, or figure out, is how to do the question above. I can clarify.
A FM layout is divided in different parts, like body, head, footer and so on. On my layout I have a series of icons that leads to different layouts, like a menu. They are all in the header tab. But the fm GO on iPad has a very good build in popup for choosing layouts, so I don't really need my menu on that system and it takes a lot of space from the rest of the system. The normal FM has it as well, but not as big and nice, and since the iMac screen is so huge its better to have a large idiot-safe menu.
The ide I had was if I could do something like this
If[ Get (SystemPlatform) = 3)]
Hide Header part
Or can i put the menu in a script based Tab control box and then if system =3 then hight=0px? Its a hard nut to crack. but it would be good.
any solutions are appreciated...
Posted 13 February 2012 - 05:42 AM
Dan's suggestion is the only way I know if, which is to have separate layouts for different devices. This also makes sense because you don't want to be limited to designing your layout to the smallest device your solution runs on.
A (less common) alternative would be to create a tab-panel which spans the entire layout and hide them by making them 0px in size. You'd have to get rid of the header section and work in body only. Then script, as suggested above, but instead of going to specific layouts, go to specific tabs. In my opinion this creates a bag of hurt though, because you end up having the same objects on the same layout more than once. You'd have to come up with a concept for object names, tab order etc. which ensures that the information on the alternate tab is not revealed when it's not supposed to. I really recommend Dan's approach.
Posted 13 February 2012 - 06:17 AM
Posted 13 February 2012 - 09:18 AM
The only other option you have is to hide the status area instead, so both that and your header part are not shown. If you do this, you need to re-create all the necessary elements from the status area; like New/Delete Record, Find, current record, found count, etc.
Posted 13 February 2012 - 10:07 AM
The only other option you have is to hide the status area instead,
Aha, Thats a way to do it. But the toolbar is nice to have, especially on the iPad. I gave it a try and it was almost there. But thanks for the tip, might come in handy some day. The layout still works, but its a bit of scrolling sideways to get all the info. I think the next iPad will have a higher res so I assume it will fit then, but Ill probably need new glasses to se anything .