LaRetta Posted October 3, 2013 Posted October 3, 2013 Envision please a menu bar across the top of a layout, where the words will change depending upon a list that changes. The values must always be centered across the top of the marquee (no exceptions) and that is where I am failing (attached fp7). So taking 'theList', turn it into a repeating calculation which looks like the example (except have it adjust properly so it always centers on the layout). This single field will allow it to remain centered even when using anchors. If I could dream further, I would also like that, when User clicks a (character of a) word, all the reps around that word change color via conditional formatting (or even if only the text colorised) so the word highlights, like selecting it on a menu bar. Also, I am using courier as a non-proportional font and I wonder if there is a better looking standard x-plat non-proportional font someone could suggest. Repetitions aren't my strong suit. If you ask why I want this, I am looking at alternate menu bars and also scrolling marquees as well as navigation tier display but I need to learn how to adjust where the sequence begins and it is eluding me. :-) Marquee.fp7.zip
No_access Posted October 3, 2013 Posted October 3, 2013 The problem with the position is in the middle, you can use Middle ( string ; i-len/2 ; 1 ) to center it, but this leaves all those pipes you need to deal with in the beginning. I will try and work on it today if I get some time, BTW I think this is a great concept.
eos Posted October 3, 2013 Posted October 3, 2013 LaRetta – here are two methods for centering the menu items within the repeating field: one with pre-padding the string, the other one by taking into account the padding when calculating the rep number. As for the other items on your wish list … Marquee_eosMOD.fp7.zip 1
comment Posted October 3, 2013 Posted October 3, 2013 If this is for display only, I believe you'd be much better off using a web viewer. For any kind of user interaction with the display, I'd say forget it. You will spend an enormous amount of time and effort on it and it will still be clunky. And it's not a standard interface for a desktop application anyway. If they are dead set on it, let them use CWP. 1
Raybaudi Posted October 3, 2013 Posted October 3, 2013 @ eos Please, could you say to me why you used unstored calculations ?
eos Posted October 3, 2013 Posted October 3, 2013 @ eos Please, could you say to me why you used unstored calculations ? No conscious decision – I duplicated LaRetta's calculation field as basis for modification. Since they work – as far as it goes – I had no reason to change anything. Why?
comment Posted October 3, 2013 Posted October 3, 2013 why you used unstored calculations ? I am guessing LaRetta had it unstored in order to get it to update quickly while experimenting with the formula? Speaking of the formula itself: you can use Middle ( string ; i-len/2 ; 1 ) to center it, but this leaves all those pipes you need to deal with in the beginning. That is a bug/feature of the Middle() function, where Middle ( text ; 0 ; 1 ) and even Middle ( text ; -20 ; 1 ) both return a non-empty result equivalent to Middle ( text ; 1 ; 1 ). For this reason, it's not necessary to do: Max ( Div ( 100 - len ; 2 ) ; 0 ) as it will not accomplish anything, and you must compare i to the beginning offset before applying Middle() - as eos has done in his second calc. Thus the formula can be shortened to = Let ( [ string = "| " & Substitute ( Extend ( theList ) ; ¶ ; " | " ) & " |" ; offset = Div ( 100 - Length ( string ) ; 2 ) ; i = Get ( CalculationRepetitionNumber ) ] ; Case ( i > offset ; Middle ( string ; i - offset ; 1 ) ) ) 1
Raybaudi Posted October 3, 2013 Posted October 3, 2013 @ eos Thank you. Only because I didn't see a why. @ LaRetta This, based on eos's file, highlights the clicked word ( if single word ). MarqueeMOD2.zip 1
LaRetta Posted October 6, 2013 Author Posted October 6, 2013 I've been on vacation, sorry for the late response. How very cool. I will play with this and respond when I get the chance. I appreciate everyone's responses very much!!
LaRetta Posted October 7, 2013 Author Posted October 7, 2013 Oliver, of course! I forgot the test to extend, thank you! Daniele, this is great! I appreciate the sample! I was trying all kinds of things (hence unstored) and NoAccess, the Middle() function was one of my issues; thank you for helping me as well. I used proportional font on the reps example because otherwise it looked dorky, whereas single field allows any font (one of the few advantages of the single-field over reps). Attached was my existing attempt using a single field. When a word is selected, I disliked the entire field border turning black and repetitions look better (less flash of the field border). Client wanted the background to turn color (reps) and my single field approach failed (of course). Hi Michael! Client was firm on horizontal, centered display. I don't see how that is against standard practice (even viewing here, the main sections are across the top as are they on many mobile and desktop solutions) and Client wants these top-level sections displayed on all list and form layouts. I like sidebars myself. The options across the top will be purchased so will vary by business (but will still fit within the single height). Regardless, you are correct that it is certainly clunky trying to center this using native FM. We can't get an individual word hover in 12, nor a pressed response nor a background highlight with either of these techniques. A User could also drag-select the text which looks funky although I made it a calc so they can't actually change it. And another cool thing I saw … if you stretch the window, the repetitions expand in a cool way (when anchors are set to lock both sides). If anchors are set only top only then it centers and maintains its ratio regardless of windows size, just like the single-field approach. I learned a bunch here and had a good time, thank you all. Any additional input is always appreciated. MarqueeMOD3.fp7.zip
LaRetta Posted October 7, 2013 Author Posted October 7, 2013 BTW, if I decide to show this concept to the client, I will adjust to use Comment's calculation, dropping the Max(). And I couldn't mark a single post as 'solved' since both Oliver and Daniele did it together.
eos Posted October 7, 2013 Posted October 7, 2013 Hi LaRetta – Daniele's solution had the disadvantage that when you clicked an active selection again, the selection extended unto the end of the field. You one-field solution doesn't do that – good! – but you if you click into field outside the defined text boundaries … EDIT: … on the right side …
LaRetta Posted October 7, 2013 Author Posted October 7, 2013 Ug. Well on Daniele's, I am sure it could be resolved. On mine, if you click prior to the first entry, it selects it. If you click after the last entry, nothing happens. What would you want to happen? It could be adjusted that it selects the last one or didn't select the first one but I don't like my single-field approach anyway. Thank you for bringing this up for us. Isn't this stuff simply the bomb?
eos Posted October 7, 2013 Posted October 7, 2013 If you click after the last entry, nothing happens. Nope – if an entry (any entry) is selected, it is deselected if you click past the last one. What would you want to happen? I'd want – regardless of repeating field or single field approach - that clicking an entry should select/deselect it, and clicking anywhere else should select/do nothing. Isn't this stuff simply the bomb? It's quite nice …
LaRetta Posted October 7, 2013 Author Posted October 7, 2013 I do not want a click-select, click again unselect. This is a NAV bar and once clicked, they will be switched to another layout and we want it to still display the same highlighted word so they know where they are. If they click outside the selections, I want it to do nothing. But remember ... I don't want the single-field approach at all.
eos Posted October 7, 2013 Posted October 7, 2013 This is a NAV bar and once clicked, they will be switched to another layout and we want it to still display the same highlighted word so they know where they are. If they click outside the selections, I want it to do nothing. Right – you still need to watch your right both flanks!
eos Posted October 7, 2013 Posted October 7, 2013 But remember ... I don't want the single-field approach at all. Understood – but the repeating field variant in your MOD3 shows the same behaviour; plus it selects everything to the right if you click an active selection again (which the user is not supposed to do, but then you know how users are …)
comment Posted October 7, 2013 Posted October 7, 2013 I disliked the entire field border turning black and repetitions look better (less flash of the field border). It's a tough call deciding which one is clunkier: the on-click outline around a single letter or the one around the entire field. Still, I think your single-field version is better than the repeating one. Some of it is just a matter of implementation - for example, right now the repeating version has a problem with clicking the same item twice, and it isn't multi-user compatible. These issues can be fixed - but the mono-spaced font cannot. BTW, the single-field version needs some more work, too: notice what happens when you click to the left of "| Accounts " as opposed to clicking to the right of "Users |". It shouldn't be doing that, IMHO. Try also loading the following list "Fast¶Faster¶Very Fast", then selecting "Fast". Both versions. --- EDIT: I see that I am not fast enough today...
comment Posted October 7, 2013 Posted October 7, 2013 Client was firm on horizontal, centered display. I don't see how that is against standard practice (even viewing here, the main sections are across the top True, but here we are inside a browser application that's taken up the menus reserved for the desktop application. That's why I said let them use CWP: the horizontally centered top menu is practically standard for web applications running inside a browser.
Raybaudi Posted October 7, 2013 Posted October 7, 2013 I think your single-field version is better than the repeating one. ...but if she wants to highlight the background of the word, the only choice is a conditional formatted repeating field. ( In a single field it could be used only the HighlightYellow text style )
comment Posted October 7, 2013 Posted October 7, 2013 ...but if she wants to highlight the background of the word, the only choice is the repeating field. ( I think ) Yes - unless you like Filemaker's HighlightYellow style... EDIT: LOL, this time I was fast...
Raybaudi Posted October 7, 2013 Posted October 7, 2013 LOL, give me the time to correct my poor english :-)
comment Posted October 8, 2013 Posted October 8, 2013 Anyway, if you insist on highlighting the background, here's a different take on the repetitions: TopNavMenuR.fp7.zip Note: I have used a global field for testing; of course, you could use a global $$variable instead.
LaRetta Posted October 8, 2013 Author Posted October 8, 2013 (edited) Ah this tickles me! Highlighting the background was one of the primary reasons I looked back at repetitions after discarding them originally. Another benefit of the single-field is that more labels can fit across since there is not a set distance imposed such as by portal or button object or repeating field (when each rep was a word). These techniques didn't space the words nicely from each other which was why I went with single-field (in addition to the other requirements). A rep for each character (and mono-spaced) solves that problem very nicely. About the only thing I don't get is the hover highlight or the button press action nor can I use the 'hand.' But now days everyone knows things are supposed to be pressed, clicked and pointed at anyway. Hmmm, did that sound like justification? It isn't, it's just an observation pointing towards trends. I really like your conditional highlight calc as well - I almost switched to using position of the pipes. I like that Andale Mono you show better than Courier I used and it appears to be available for both platforms (free) and standard quite often. I will have to research that further - the links I reviewed were a bit old and it seems Microsoft has it standard (now?) and it renders great on Mac also. Thank you, Michael. And Go To Object [ null ] ... makes me smile ... Edited October 8, 2013 by LaRetta
comment Posted October 8, 2013 Posted October 8, 2013 There's one more thing I should have done: add another conditional formatting - before the existing one - to darken the background slightly when not IsEmpty ( Self ). That would frame off the area where a click actually does something and (hopefully) reduce the urge to click on empty repetitions. You'd probably want to give up on the pipes, too in such case - see attached screenshot. Â Also keep in mind that with conditional formatting you are not obligated to use the same font on both platforms. Well, despite my prejudice I gave it my best shot - and I still don't like it...
LaRetta Posted October 10, 2013 Author Posted October 10, 2013 (edited) Well, despite my prejudice I gave it my best shot - and I still don't like it... I agree that it was still rough. How about now? I used your file, I hope that was okay. If not please let me know and I can replace it, no prob. :-) I believe that the last two examples with the dark background are quite acceptable (one using reps and the other single field). And I have turned back to preferring the single field even though it can't highlight the background because, if we use a dark background, the field border doesn't flash at all on single field whereas you can still see the single rep highlight a bit AND because we are not limited at all on fonts. We might be able to highlight the background by stacking something like a webdings bar behind and turns the 'letter' colour (like a progress bar?) but it would mean reverting to mono font (I believe). We get no flashing at all (even in 12) on the single field as long as we use a dark background, LOL. And this is a lot less expensive that CWP! I love this forum! Thank you all so much! Edited ... BTW, improvements to my code or process are always welcome. BTW, I disabled the Freeze Window which caused a bit of flash and didn't seem necessary but it might be needed on Windows. Actually, the Freeze Window doesn't make a difference - it must have been ME that was flashing! Oh, and Michael, I disabled your custom dialog only so we could just focus on watching the field as we clicked ... TopNavMenuRMOD.fp7.zip Edited October 10, 2013 by LaRetta
comment Posted October 10, 2013 Posted October 10, 2013 How about now? Well, the flash issue is solved, but at what price? Still, I suppose you could fit the overall design to match the dark menu. It's not like I can talk you out of it at this point, so don't let me spoil it for you. I'll just sulk here quietly in the corner... We might be able to highlight the background by stacking something like a webdings bar behind and turns the 'letter' colour (like a progress bar?) but it would mean reverting to mono font (I believe). True. it must have been ME that was flashing! Should I? Shouldn't I? Who can resist this? That's what she said!
LaRetta Posted October 10, 2013 Author Posted October 10, 2013 oh best laugh I've had in a long time. Yes you should have and I'm tickled you did!! I am just relieved that I can say I gave this my best (native FM) according to the requirements and let others make the decision. But it is fun to learn this stuff always. That is one of the few TV shows I watch (The Office). I didn't start watching it until Netflix on my iPad this past year. That was perfect zinger!
David Nelson Posted October 10, 2013 Posted October 10, 2013 Welcome back Comment! And funny response too.
Raybaudi Posted October 10, 2013 Posted October 10, 2013 Hi LaRetta very nice the final solution of a single text field, that is even more beautiful with gradients of 12. I would modify only one step of the script "OnMenuClickSingle-Field" with: Set Field [ Table::gMenuIndex ; Let ( [ string = Get ( ActiveFieldContents ) ; pos = Get ( ActiveSelectionStart ) ; i = PatternCount ( Left ( string ; pos ) ; " " ) ] ;Case ( 1 ≤ i and i ≤ ValueCount ( Table::MenuItems ) ; i ; Table::gMenuIndex ) ) ] because in this way each click outside of the menu items doesn't modify the contents of Table::gMenuIndex
LaRetta Posted October 10, 2013 Author Posted October 10, 2013 Hi Daniele! I realized after I posted the file that I had forgotten to include Michael's logic to test 1 <= i ... I also like your default result idea and I will include it as well. Much appreciated! And yes, surprisingly, I really like the way it turned out, it looks amazing on my gradient NAV bar and it will come in handy for other things as well. It is also good for Michael to sulk quietly in the corner sometimes ... he is right far too often to suit me; it isn't human. I will correct the example file when I am back at my computer - I also wanted to tweak the calc a bit - the colorizing method I used was put together in a rush and it felt convoluted.
rob Posted October 13, 2013 Posted October 13, 2013 I wonder why you can't use repetitions where the word is a repetition and set anchors to stretch and set text to center. Wouldn't that do the same thing? I'm probably missing something but I had to ask how that center is different than the center you seem to want.
LaRetta Posted October 14, 2013 Author Posted October 14, 2013 Hi Rob, Â Here is screen shot. Â The top image is regular 6 repetitions and the bottom two are the two solutions. Â First thing notice that your suggestion requires a set number of repetitions. Â Solution 2 using reps also would have a limit but it wouldn't restrict the solution in any way and 3 uses regular field so is unlimited (except by size). Â But even more obvious is that, if one title is very long and another is short, they do not center to each other and you have these large gaps between some labels and small gaps between others. Â Also, you must make the repetitions the largest width you will need to accommodate so all that wasted space decreases the number of labels or text which can be displayed. Â I hope this explains it and it is never a problem to ask on these posts. Â :-) By the way, one could also pad spaces and spread out the result in the single-field example. Â It would be very easy and I might add that as an option (full or centred). Â Thanks for bringing it up!! Â And no, I haven't corrected the file yet. Â I'm off in search of the holy grail at the moment.
rob Posted October 14, 2013 Posted October 14, 2013 That text spacing looks terrible. and limit of number of repetitions is bad, DOH. Thanks LaRetta.
bruceR Posted October 14, 2013 Posted October 14, 2013 "Wouldn't that do the same thing?" Rob: what happened when you tested your suggestion before posting it?
Recommended Posts
This topic is 4116 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now