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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Customizing browse and modify memo 1

Status
Not open for further replies.

dmusicant

Programmer
Mar 29, 2005
253
US
I have an app I use a ton. Instrumental are a browse of a table and going into a memo field. Seeing the memo field tends to remember my last font size, which is important to me because 8 or 9 is way too small and I usually set the font size to 14. However, in a lot of tables it defaults to a small font size and I have to increase it with a series of mouse clicks. If I could get the memo fields to always open at 14 point, that would be great.

A more serious problem is that browsing one of the couple hundred tables in the app ALWAYS defaults to a too small font. I usually just live with that and increase when I need to, but I wish that VFP 9.0 would remember the last font size in the browse for any particular table, or even for all tables in the app. As it is, if I increase the font to, say, 14 point and close the table, next time it opens the font size is always back to 8 point. I am using BROWSE PREFERENCE, so it remembers the field order I want and the size of the columns, but it doesn't remember the font size, which seems to me a shortcoming of the BROWSE or BROWSE PREFERENCE command. Am I missing something? Do I have to rewrite my app and start using grids to get the control I want?
 
Thanks, Olaf. I just set Arial 14 as default for memo fields. I selected Memo for type, clicked the checkbox "Override individual settings," set to Arial 14, clicked Set as Default. That is working! I figure I have to do the same thing on each of my machines accessing the networked data.

Edit: Interesting quirk in this is that opening up a table, then a memo field, the first time I do this, I am not getting the specified 14 font size. But after closing the memo field, the next time I open that field in the table it is size 14 and the behavior then continues as size 14. This is evidently happening for all the tables. It's odd, maybe a bug.
- - - -
I thought I might mention that I have a few interesting things that I've set up in my browse windows. In a couple of my apps I can right click my mouse while in the browse window and the order of the table changes.

In one of my apps, each table has characteristics that are designated in its own record in a table of metadata. One of the fields in any of those tables' record in its metadata table is named "reorder." That's a character field of length 70. The contents of that "reorder" field dictate what happens when I right click while browsing that table. If nothing is in the reorder field, the order switches between one character field and the ID field. But, for example, imagine the reorder field isn't empty for Table1, which has fields named name1, name2, address1, address2, city, occupation. The reorder field in the metadata record for Table1 might be this: "name2, city, occupation ". In that case successive right mouse clicks in the browse of Table1 would change the order from name2 to city and then occupation and than back to name2, etc. Of course, there need to be tags with those names for it to work without error. I imagine something like that could be implemented in a grid, but I'm doing it with basically FPW code, ON KEY LABEL RIGHTMOUSE, etc.
 
Don't know why but I can't find the facility to quote others' posts in threads.

If you mean that you want to include some text from another post within your own post (as I am doing here), copy and paste the relevant text, and then wrap it in [ignore]
[/ignore] tags. Or hightlight it and click the Quote button on the toolbar immediately above the post-editing box.

If you mean that you want to include a link to another thread within your post, just copy and paste the thread number (e.g. thread184 - 1788337). The forum software will automatically expand it to show the thread title as a hyperlink.

I thought I might mention that I have a few interesting things that I've set up in my browse windows.

Interesting, indeed. But the more you extend the functionality in this way, the stronger the argument for using a grid.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Thanks for sharing the observation about how the default overriding individual settings only does so at second time usage. It's something I can't observe, since my defaults are set up for a long time.
Yes, this might be a bug, a bug that could make you think this overriding nature doesn't work and is not worth the hassle.

And Mike, you meant quote and not ignore, you may had in mind to use ignore to be able to show how to write the quote tags, but since you wrote the closing ignore tag wrong, your sampe quote tag effectivly becomes a quote instead of showing how it's written: [tt][ignore]
someone said:
quoted text
[/ignore][/tt] <-- this is surrounded by ignore tags to let the quote tags show up here instead of being rendered as a quote. It also uses a [tt]TT[/tt] tag wrapped around the ignore tag, so this whole section is displayed as you see it in the monospaced font also used within the text area of the post editor.

In general TGTML modifications of posted texts can be applied easiest when first writing content, then selecting it and clicking on the feature you want, be it code, quote, highlight, whatever feature acting on inner text or even inner tgml, eg you can even highlight something within a code section.

Whenever you use an icon of the TGML toolbar the current selection is surrounded by the opening and closing TGML tag bracket needed for the feature you click. And if you start by clicking on a tag, like the Quote icon, that'll paste the tag brackets and put your text cursor at the inner position between these brackets.

Sometimes it's nice to have memorized the tag names, so you can simply write them without changing between mouse and keyboard.

Bye, Olaf.




Olaf Doschke Software Engineering
 
you meant quote and not ignore

Yes, that's what I meant, but (as you might have noticed) I made a mistake with the closing bracket, which threw the whole thing off balance. I've now edited it.

The VFP code editor has made me careless. What we need is Intellisense for Tek-Tips.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
You would not get that problem with a markdown syntax, if that only allows single character brackets that can't become invalid. But even then you can have nesting errors. And you couldn't have tags with attributes.

Olaf Doschke Software Engineering
 
Koen Piller said:
Your "I don't think I've done anything with that book yet" says enough.

I spent some time with the book last night. I must admit it's pretty deep for me in places. They don't dig in and explain how to do some things, they just assume you know. I took a couple courses in Visual Foxpro, was the sole programmer maintaining and augmenting an extensive VFP application for over 2 years, but have never written a VFP app from scratch and unfortunately, the two big apps I have created (which are for myself) were started before VFP existed and I've not introduced OOP techniques into them. They work in VFP, however they also work in FPW! Some introduction of Visual Foxpro techniques into them is certainly advisable and it would be fun.
 
They don't dig in and explain how to do some things, they just assume you know.

That is correct. The book makes no claim to being a tutorial or a book for learning Visual FoxPro. It's more like a series of detailed hints and tips for using the product. It assumes that you already have a good knowledge of VFP.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Olaf Doschke said:
If you want some setting for every browse or memo window or code window, the Tools-Options IDE has the "override individual settings". Just first pick the window type, this override option is an optoin per window type.

And don't forget to exit the dialog with "Set as Default".
This is working (except not the first time using it, as I said) but I found that my URLs in my memo fields were no longer launchable. I had to go back into Options/IDE and for Memo Fields check on Embedded hyperlinks and Set as default to get that back.

I'm still finding it very cumbersome to quote anybody. When reading anyone's post I have no access to icons, e.g. the quote icon. If I scroll down to bottom of window, there I can compose a response, but then I see nothing of what's above. Is my page here configurable? Most every forum I've been to where I'm subscribed has facility while reading any post in a thread to compose an answer right then and there, for instance by selecting some text from the post and clicking a quote icon. I see nothing of that here. To quote Olaf above I had to scroll to bottom, click quote icon, type in Olaf's name (from memory, although I could have scrolled up for more work), then scroll up to the post I wanted to quote, select and copy text to clipboard, scroll back down to bottom and paste between the quote HTML blocks. Way too complicated, I think there must be a better way. What am I missing here?
 
Mike Lewis said:
Interesting, indeed. But the more you extend the functionality in this way, the stronger the argument for using a grid.

OK, maybe I have to do it this way, dunno. Copied Mike's text to clipboard, hit END, pasted, selected, clicked quote icon, then typed in Mike's name into the Who dialog, saved that.

OK, well, may I ask, Mike, what would be a way using a grid to get that same functionality, i.e. have a browse sequence through (loop through if I keep going) a set of tags with right clicks? As I indicated, I have that set up in my browses of all tables for one of my apps. This app has over 200 tables associated and they are all referenced in tables of metadata and the record for each table has a "reorder" field, CHR(70), that can have tag names in it that I want to be included in the reordering sequence, all separated by at least one space or even commas. ON KEY LABEL RIGHTMOUSE is used to reference the reorder functionality, a subroutine.

 
In regard to forum functionality:

I like this chronologically ordered way. In other forums, the indentation of posts can also lead to extreme cases of too slim space.

Yes, you first copy out all things you want to quote and since that often is more than one part of more than one post it's not done with the more direct contextual feature you describe anyway. I know this from MS forums, they have other problems.

Bye, Olaf.



Olaf Doschke Software Engineering
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top