On Mar 11, 2008, at 9:02 AM, Walter Lenk wrote: > I wrote: >> a big stumbling block is creating replacements for both styled and >> scrolling edit fields. I am guessing that this involves APPEARANCE >> BUTTONs, but I have not been able to devine how. > > Brian S. wrote: >> Are you looking for vertical and horizontal scroll bars or just >> need the >> text to scroll within the window as the user types? There are >> different >> methods of achieving the general goal depending on specific >> requirements. > > The edit field in question is one of several controls in a larger > window. The contents of the field are not entered by the user - the > program uses the field for process commentary when doing things > like processing files, showing comm port traffic, etc. This > produces a trail that the user can look at and copy to the > clipboard. I sometimes use different color text to differentiate > between processes (much like the FBtoC window). Thank you for a very good description. That always helps. The log window in FBtoC is close to what you describe except it is the size of the window and not just one edit field. However, the concept still applies. The log window in FBtoC is implemented with MLTE calls for an HIView loaded from a nib and does not use Scroll Button. Using this method is not as simple as Scroll Button, and I'm not aware of a short demo for this ( but it could exist and I just don't remember it ). Possibly the FBtoC team can either make the appropriate FBtoC source code available so you can browse and learn. The FBtoC source is available to the FBtoC team but I haven't discussed sharing source on the list ( or via the list ) with the team. In any case, unless you have been slogging around TXN calls ( MLTE ) lately, the log window source is likely to look very foreign to you. Maybe another approach is best due to the difficulty level. > > I have been using the following code to create the field and scroll > bar: > > CALL SETRECT(rect1,10,10,300,200) > EDIT FIELD -_EFCommStream, "", @rect1, _copyonlyframed, _leftJust > LET rect1.Left% = rect1.Right% + 1 ' Move right for scrollbar > LET rect1.Right% = rect1.Left% + 14 > CALL INSETRECT(rect1,0,-1) ' make it a bit Taller > SCROLL BUTTON -_EFCommStream,0,0,1000,10,@rect1,_scrollOther > > And this code to insert the contents: > > EDIT$(_EFCommStream,_MaxInt,_MaxInt) = A$,,,,,TextColor ' S$,font, > size, style, mode, color > EDIT$(_EFCommStream,_MaxInt,_MaxInt) = "",,,,,TextColor ' S$,font, > size, style, mode, color > SCROLL BUTTON _EFCommStream,1000 ' <- Get Scroll Button to > Follow New data > SCROLL BUTTON _EFCommStream, Fn GetControlValue (Button& > (_EFCommStream)) + 1 '<- Get the window to follow new data > > This produces exactly what I need in FB, but several things break > in FBtoC translation. Scroll Button and its various options was one of the later implementation in FBtoC. Despite the "implemented" notation in the FBtoC help, none of us would be surprised by bugs in this area. Is it possible for you to copy and paste the log errors related to Scroll Button into a list post? ( use RTF instead of plain text so all the colors etc. are there ). I might be able to use the snippets provided but I'm being a little lazy here due to other projects taking my time. TIA! Brian S.