Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional layout? Question and tip

Status
Not open for further replies.

RubenVanDenOord

Programmer
May 26, 2003
11
0
0
NL
Is it possible -like in Excel- to define conditional lay-out in FP5.5Dev?

What I try to do is this:
1. In my lay-out "preferences" I've made fields with the following names: Tab1, Tab2, Tab 3 etc.

2. In my user lay-outs I merge the fields as discribed and set the merged fields as buttons. This way I only have to change the Tab names in my preferences lay-out to change all my tabs in the database. (Of course you can lay the merged field over a cool button graphic too, that way all your facny buttons are changed in a heartbeat. Unfortunally the next step can not be done IMHO)

3. So far, so good. Nothing fancy yet.

4. Here comes the tricky part: If a field (e.g. Tab3) is empty, I'd rather show the merged field transparent so it becomes "invisible". BUT when I add a Tab name in the Tab3 field, I want the merged field shown blue (or red for that matter)

I admit, I'm more a designer than a programmer ;-)

Anyone who's new to this technique of tab-programming, I'm happy to send him an example file. Just my 2 cents...
 
hello Ruben!
Are u using this on the web (CDML) or just for FM purposes?
sounds like u will need some SciptMaker functions such as Case of.....Set Field etc. If this is not CDML I can't be much of help but I can just direct u towards mentioined scripts....if it is a web solution I might be able to .//help \Y
good luck
 
Hi Lebisol!

Thanks for your reply. I guess the trick I need will be just for FM purposes. I'm designing a standard lay-out for all my apps, so I don't have to worry about the lay-out anymore, and point all my attention to the programming part.

I need to do that because, like I said.... I'm not that great of a programmer....
 
OK lets try...and if nothing maybe someone else joins on this conversation :) :
-1st.
In my lay-out "preferences" I've made fields with the following names: Tab1, Tab2, Tab 3 etc-

> I am not sure I understand this...."Fields" are made under File-->Define fields and those fields are the database "parts" so make sure we are talking about the actual field that exsits and is defined not just a label. - but I think that is what ur saying...

-2nd.
In my user lay-outs I merge the fields as discribed and set the merged fields as buttons...-

> Merged fields can only be "joined fields" by creating calculation -into another(new) field : all this from database perspective....so I am not sure about what you meant about "as buttons"

-3rd
> :)

-4th.
..., I'd rather show the merged field transparent -

> Well, this kind of connects to no.2

so write some more about this deal and maybe we both learn something!
All the best
[x]E-mailNotification is: ON :
 
OK, lets get back to what I try to do:

Up front: I know the FM basics. :)

Here we go: I've defined 30 fields, known in my database as Tab1... Tab5 (the main chapters in my pre-designed lay-out) and the fields Tab1.1 ... Tab1.5, Tab 2.1 ... Tab2.5, Tab 3.1 ... Tab 3.5, Tab 4.1 ... Tab 4.5, Tab 5.1 .... Tab 5.5 (the sub chapters in my again predesigned layout.).

All these fields are in a special lay-out I call "preferences". At the same time I've created 30 new layouts. These layouts are designed as a Rolodex kind of look, with "tabs" for every main and subchapter of my database. You probably have seen it before. These "tabs" are in reality merged fields with a certain color, border and effect. All "tabs" are set as buttons to point to another lay-out.

NOW.... If I fill in the fields in my "preferences" lay-out, the "tabs" in all 30 layouts are auto-filled with the right tabname.

For example: I want to make a logistics database

Tab1 "sales"
Tab 1.1 "clients"
Tab 1.2 "products"
Tab 1.3 "orders"
Tab 1.4 "invoices"

Tab 2 "stock"
Tab 2.1 "suppliers"
Tab 2.1 "orders"
Tab 3.1 "deliveries"

and so on....

The reason to design my databases this way is to create an instant lay-out in witch I only have to set the fields in my "preferences" lay-out and it automaticly changes ALL tabs in my WHOLE database. It saves HOURS of my precious time.

NEXT... Some Tab-fields will not be set. I simply don't need 30 lay-outs for every database I make. BUT the empty Tabs are still shown. AND THAT'S WHY I want to have conditional lay-out: All tab-fields not set must result in a transparent Tab, a light gray tab or any other tab I feel to design.

I can imagine that someone just can't follow my sick and twisted little mind. I will not hold it against you, It took ME about 33 years to know a little about myself. I'm happy to e-mail you a copy of my predesigned layout I created so far. I'm not done with it yet, but it can ease our conversation a little.

Cheers,

Ruben
 
Hello Ruben!
Now it makes sense.....if I really did understand you correctly you would like to have a "Dynamically Driven DB that Generates Layout Elemets"
I am 100% sure that this is a project for ScriptMaker...I am not that great at but I will ask arround.
In theory (in case u have some one else to ask) I would imagine something like this:
----------theory :) --------------
Loop
For as many "tab" fields
IF Field:Tab1 is Empty THEN
write nothing (don't create a tab)
ELSE
write a "tab with a label that = content of the Field:Tab1"
End Loop
--------------------------------

again, as I said earlier I am really BAD at scripts but I think it is possible. This is a very interesting idea and I will look into it...no promisses.
p.s. let me know if I did actually understand you correctly :)
....
 
Yes you can have the navigation determined based on a script take you anywhere based on any number of scenarios. I have a solution that does this and also changes to the correct layout based on the users detected screen resolution. This same solution also uses dynamic color changing fields throughout as well.

I don't completly understand your problem but I know I can help you figure it out. I don't know CDML at all. I do know the FM stuff pretty good.

My color solution if you want to look at it. This is a free demo down load. To open this and look at you will need to make up a company name and address to get past the first script. Click on SETUP tab, then COLOR. The same concept can help you color code your solution anyway you would like.


my email mlisonbee@charter.net.

I'd like to see what you are trying to do.

Thanks

Marty
 
:) see Ruben, now we are getting some people interested...I can help you with CDML but can't with FM :)[<
that is why MARTY is here...
&quot;I can imagine that someone just can't follow my sick and twisted little mind. &quot;
I doubt that...on contrary I think this is a great Idea!
 
check the post-link above!
_____________________by:pupiweb_________________
Take a look at Navigator by Nico Kuilmann
ftp://ftp.fmfiles.com/download/open/Navigator.sit
ftp://ftp.fmfiles.com/download/open/Navigator.zip
or at Smart Tabs by mikhail Edoshin
--------------------------------------------------

do you need more help or did you develop an idea by now?!
all the best!
 
Hey, Ruben, I think you are a genius.
You won't forget to post if you don't get a good solution, will you?

Cheers,
Paul J.
 
Hey Guys!

I've been away for a couple of weeks and I'm glad to see the discussion is still going strong. Thanks to all who tried to point me into the right direction. I'm THIS far to the solution. I think I only have to take my IBook and get myself locked in a moist dungeon with some FMP expert books for 6 months. I thought I knew the scripting basics, but..... I still have a lot to learn.

The solution to my problem is way out of my league... YET! I will keep on trying script programming, and as soon I figured it out how the trick is being pulled, I will come out of my dungeon, flap my bat wings once or twice and publish my solution on a website. Then we can take it from there. [bat]

In the mean time lets keep in touch!

Best Regards, Ruben van den Oord
(As the finishing touch, God created the Dutch)
 
keep it up Ruben....and don't forget that some of those &quot;gurus&quot; work on too many projects at the time and CAN give you the WRONG advice...follow your gut and will get it done!
All the best!
 
Thanks Lebisol,

I just got the chance to take a more serious look at Mikhail Edoshin's Smart Tabs. (thanx for the link) this is pretty much I had in mind, but this solution is far more sophisticated than I ever could dream of. IT LOOKS GREAT! This may be a good starting point...

Thanks again.

Ruben
 
[2thumbsup]
my pleasure...I started the discussion on the other forum but since I am not doing it....it is kind of hard to keep up withe the project that ur developing.
So, I hope u have enough resurces to battle it out...who knows, some day I willl be asking you to teach me how to do it :D<<[

All the best and good luck!
 
ª?·\?d....

The structure of Smart tabs doesn't fit my layout tool architecture. For all you guys who are curious what I've been doing lately here's the URL for some screenshots.


My ultimate goal is a empty database structure with:
10 modules
10 submodules for each module
unlimited layouts per submodule

This way I have a GUI for a solution that is build with at least 100 databases (I say at least because every submodule can contain several databases)

Please let me know what you think of the project
 
Hi Ruben!
Nice work so far...and as I said before- I always liked to idea. Just a side note: try to keep your images outside of the DB if u have not done it so far.
here is a link to this issue:

I hope it helps u organize your project. Also, if u like and can/want to share some of your work post it
here:

thanx and Good Luck!
 
...and I don't know if u implemented it already but just a thought:
&quot;multilanguage support&quot;
-different icons/language as a choice shouldn't be too hard if u can get a few words translated - such as Delte-New-Add...etc.
anyhow
all the best!
 
It will certanly have multiligual support. The fun thing is that the lay-out tool is a database itself. This way I can call record 1 &quot;englisch&quot; record 2 Dutch, record 3 &quot;german&quot; and so on.

The only thing to adjust in the whole structure is a setting in each database to look up the appropiate record with all the translated data.

All graphs in the user interface are non changeable fields in the database. So yes, they are in the database, but the images are small (GIF) and this way I can keep changing the color of the fields etc. If I want to make the NEW button green, I just drag and drop the green button in the layout tool and all NEW buttons in all 100 interfaces are chaged in a heartbeat.

I will take a look at the link anyway.

Neat huh?
 
I took a look at the linking discussion. This is what I did in my database:

In my layout tool (my recources) I made containers (like <TABGRAPH_ACTIVE>, <TABGRAPH_INACTIVE>, <SUBTAB_ACTIVE> and so on) for every button I have in the GUI.

In the GUI I made calculated containers like <TAB1> = <TABGRAPH_ACTIVE>

Is this direct linking or is this a variation on the copy/paste process?

The empty database (1 module) is about 290K, and when I add a 1000 records (no data) the database is about 386 K. IMHO the gifs do not attac the speed and storage space of the database
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top