Page Index Toggle Pages: [1] 2  Send Topic Send Topic Print Print
Hot Topic (More than 10 Replies) Programming F6 (Read 2019 times)
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Programming F6
Jan 8th, 2006 at 5:19am
Print Post Print Post  
Hi -

I searched the Program Guide but could not find a command that would expand a window (a feature available in Q&A, version 5).

Is there one?

In other words, if a layout element contains more text than can be seen in plain view, I want to program it to automatically expand.

Thanks!
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Programming F6
Reply #1 - Jan 8th, 2006 at 3:10pm
Print Post Print Post  
It's the same command as in Q&A 5. @FEdit.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Programming F6
Reply #2 - Jan 8th, 2006 at 4:34pm
Print Post Print Post  
Erika -

Thanks!

A "simple" suggestion for the Programmer Guide - would be that in the definition of @FEdit - you include "expand window" or something to that effect and "F6."

The User Guide has numerous references to an "expanded window" "expand field editor" etc and the use of F6.  Since some people are using the PDF versions to use the "search" feature - it would be very helpful if the terminolgy would be consistent. Just a thought that might be helpful.

16 MORE DAYS!
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Programming F6
Reply #3 - Jan 8th, 2006 at 7:47pm
Print Post Print Post  
Hi -

Is there any way to force the window to open in "maximized" view?

I'm hoping there already is; however, if not then I would certainly like to see this option as an enhancement. 

What would be real nice would be an option such as

     @fedit       opens window in "normal" view
     @feditm    opens windo in maximized view

Also, I have had a concern about the field editor - for quite some time - and keep forgetting to mention it.

If I "x" out of the box - a "natural" reaction to wanting to get it "out of the way", any data I typed there is lost.

It would be very nice on "x"ing out to be given a choice of

Close Editor and

(1) Save changes  (2) Discard changes

Thanks!

  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
digimom1962
Junior Member
**
Offline


Natalie Gann

Posts: 92
Location: here
Joined: Nov 26th, 2004
Re: Programming F6
Reply #4 - Jan 10th, 2006 at 12:13am
Print Post Print Post  
Wow! I actually have one tiny answer I can contribute.

Actually, I asked the maximize question before and Windows has an option where you right click over the short-cut then select properties.  You can then select to run normal window, minimized or maximized. 

Alas, this is the extent of my usefulness.Roll Eyes

Enjoy the programming classes. Erika is a great instructor!
~Natalie
  

So much time and so little to do . . . strike that, reverse it.
Back to top
YIM YIM  
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Programming F6
Reply #5 - Jan 10th, 2006 at 12:49am
Print Post Print Post  
Digimom -

I hate to disappoint you - but I don't want anyone to think that my question has been answered and to then ignore it.

I am not referring to a Shortcut Window.  I am referring to the editor within Sesame, which is used to expand a layout element so that you can see more of what you are entering, all at once.

BUT, Ireally do appreciate your trying.

Thanks much!
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
digimom1962
Junior Member
**
Offline


Natalie Gann

Posts: 92
Location: here
Joined: Nov 26th, 2004
Re: Programming F6
Reply #6 - Jan 10th, 2006 at 2:15am
Print Post Print Post  
Oh well, I knew it was too good to be true Tongue

At least I helped clarify the question Roll Eyes

  

So much time and so little to do . . . strike that, reverse it.
Back to top
YIM YIM  
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Programming F6
Reply #7 - Jan 10th, 2006 at 3:45pm
Print Post Print Post  
Quote:
Hi -

Is there any way to force the window to open in "maximized" view?


Not in the current version.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Programming F6
Reply #8 - Jan 10th, 2006 at 4:31pm
Print Post Print Post  
Spencer,
How does your design determine if there's "more text than can be seen in plain view"?  That is, how does the program know it needs to F6 element?
  

**
Captain Infinity
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Programming F6
Reply #9 - Jan 10th, 2006 at 5:43pm
Print Post Print Post  
Infinity -

In this particular case, I want to use a window where the user can type an e-mail message so I want it expanded whenever the layout entry is selected.

If however, you were in a record that already had text entered in a particular field, the programming would just check for the length of the field and open it when that length was exceeded.

I'm too busy at the moment to look up the proper syntax - and I may have it correct just from memory - but it would be something like (in the on element entry event):

   if @len(Remarks)>250 then @fedit

I usually use the least # of characters it would take to exceed what can be viewed without opening the editor (based on counting the number of characters in a typical entry).  I can always adjust it based on trial and error, if necessary.  (Occasionally, it might open it when it wasn't absolutely necessary, but so what?  lol) 

I hope this helps.
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Programming F6
Reply #10 - Jan 10th, 2006 at 6:24pm
Print Post Print Post  
Spencer,

Have you considered actually increasing the size of the LE dynamically, using the Height and Width commands?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Programming F6
Reply #11 - Jan 10th, 2006 at 7:24pm
Print Post Print Post  
Thanks Spencer, I'll try that.
  

**
Captain Infinity
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Programming F6
Reply #12 - Jan 10th, 2006 at 9:06pm
Print Post Print Post  
Mark -

You may be sorry you brought up the width/height issue because now I have a bunch of other questions.  I do want to be sure though, that my suggestion to provide for maximizing (using a command) the field editor does not get overlooked in the shuffle.  I would also like to be able to open a field editor from another field with something like @fedit(Comments).  That way, I would not have to leave the layout element I am in, just to add a comment.  When I close the field editor I would still be in the same element.

Now, as for width, I did not have a clue that it even existed and I am now curious about its use.  Looking at the programming manual, the example given seems to be for @width (except for increasing the element width by 1 pixel which is barely noticeable) ... and the write line tells me the number of pixels when I started and the number of pixels by which I modified it.

When I tried the width/height commands, it seems that the element "intrudes" on other elements.  In other words a white screen shows over my form and underneath I still see all the element labels, boxes, etc.  Moreover, to type in that element, I need to use the field editor, (which still opens in the regular size).

So, now I would like to know some examples of how/why/when width/height commands could be helpful.

Also, how do I get rid of the new dimensions?  Do I have to redefine the size to bring it back to normal.  Reading the programming guide, I though that perhaps the forceredraw would bring it back, but it doesn't.  It remains (even if I advance to another form) until I close and reopen the file.

Thanks.
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Programming F6
Reply #13 - Jan 10th, 2006 at 10:08pm
Print Post Print Post  
Quote:
Mark -

You may be sorry you brought up the width/height issue because now I have a bunch of other questions.  I do want to be sure though, that my suggestion to provide for maximizing (using a command) the field editor does not get overlooked in the shuffle.  I would also like to be able to open a field editor from another field with something like @fedit(Comments).  That way, I would not have to leave the layout element I am in, just to add a comment.  When I close the field editor I would still be in the same element.


We haven't overlooked your requests.

Quote:
Now, as for width, I did not have a clue that it even existed and I am now curious about its use.  Looking at the programming manual, the example given seems to be for @width (except for increasing the element width by 1 pixel which is barely noticeable) ... and the write line tells me the number of pixels when I started and the number of pixels by which I modified it.


Yes, that is wha the example does. It makes the element 1 pixel wider. If you want a more noticeable change, change the 1 to a larger number.

Quote:
When I tried the width/height commands, it seems that the element "intrudes" on other elements.


Yes, it gets wider or (in the case of Height) taller. If other elements are there, it will appear over or under them.

Quote:
In other words a white screen shows over my form and underneath I still see all the element labels, boxes, etc.  Moreover, to type in that element, I need to use the field editor, (which still opens in the regular size).


The behavior depends on the properties of the particualr element and its location on your form in relation to other elements. I'm not sure why you need the field editor to type in the element without seeing the specifics.

Quote:
So, now I would like to know some examples of how/why/when width/height commands could be helpful.


To make an element wider/narrower taller/shorter as needed. Here is a simple example which assumes a multiline text box called SizeMe. The code uses Height to expand the text box on entry to show it's entire value. It then resets the size on exit.
Code
Select All
 ** PROGRAMMING SECTION: [ GLOBAL CODE ] [] **
Subroutine SizeThisElement(vWidth as Int, vHeight as Int)

	Width(ThisElement, vWidth)
	Height(ThisElement, vHeight)
	ForceRedraw()

End Subroutine



** PROGRAMMING SECTION: [SizeMe] [On Element Entry] **
var vLen as Int
var vHeight as Int

	vLen = @Len(ThisElement)
	vHeight = (@Int(vLen / 25) + 1) * 20
	SizeThisElement(200, vHeight)




** PROGRAMMING SECTION: [ SizeMe ] [On Element Exit] **
SizeThisElement(200, 20)
 




Quote:
Also, how do I get rid of the new dimensions?  Do I have to redefine the size to bring it back to normal.  Reading the programming guide, I though that perhaps the forceredraw would bring it back, but it doesn't.  It remains (even if I advance to another form) until I close and reopen the file.


The changes to size will persist until you close and reopen the Form. ForceRedraw() redraws the screen withthe curernt settings. It does not reset sizes or colors to original values. If it did, your changes would never appear or stick.

  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Programming F6
Reply #14 - Jan 11th, 2006 at 12:01am
Print Post Print Post  
Erika -

Thanks for the detail.  I see no immediate use (for me) for this; however, I want to understand it and be able to use it should I need to.

I created a field called Sizeme and used your programming.  For some reason I did not see a discernable difference; however, that was so long ago, I could have overlooked something simple.

In any event, I played with the code and here is where I stand.

I understand most of the code and I definitely see how easy it is to return the LE to its "normal" size on element exit.

Still being a novice at Sbasic, I am a little confused about the sub-routine being in global code.  I can understand it being there if I am going to use it in a number of elements.  If, however, I planned to use it in one specific layout element, only, could I put the sub-routine, along with the other programming, in the on-element-entry event?

With regard to:

Code
Select All
vHeight = (@Int(vLen / 25) + 1) * 20
 



It appears to me that you are looking at the length of what is in the field (# of characters)  (for example 200) dividing that by 25 (which would become 8), adding 1 (which would become 9) and then multiplying the product by 20 (which would become 180).  Is this some magic formula for converting characters to pixels?  

And, wouldn't the "formula" somehow be greatly affected by the width of the element as well as the number of charcters in the field?

Lastly, I do have some difficulty when the "elongated" layout element "overlays" something else on my form.  Information may show through and make it difficult to read, etc.  If I had the room to not have the enlarged element interfere with other elements, then I could just make it larger in the first place.

In any event, since I have no immediate plans to use this, I can wait and address the issue if & when I do want to incorporate it.  The only thing I would like to know now, is the explanation about the formula.

In the way I want to use F6, however, I do not see that this would be of any value.  I still want to be able to enlargen the editor window itself.  If, by the way, we could set our own width/height for the editor (instead of just normal or maximized), that would be nice too.

Thanks!
« Last Edit: Jan 11th, 2006 at 4:34pm by SpencerWulwick »  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send Topic Send Topic Print Print