Results 1 to 9 of 9
  1. #1
    Join Date
    Apr 2004
    Posts
    11

    Exclamation Unanswered: Displaying The Complete Text!!!

    I have a form that users can access in a read-only state. Some of the information on the form have values that are longer than the width of the bound control on the form. Is there a way I can display the complete text without requiring the user to click in the field and using arrow keys to read the value? How can I display the complete text where users can just move their mouse over the field and it will show the complete text... the fields I want to display is in MEMO type so its impossible to use controltips. I will really appreciate any help!!! thanks in advance!!!

  2. #2
    Join Date
    Jun 2002
    Location
    Saudi Arabia / Philippines
    Posts
    126
    As far as I know Access has no pointer events, at least no available ones since control tips must work this way. To sense the pointer position you will need an independent Active X Control.

    Failing that have you tried playing with the Can Grow and Can Shrink properties for both the memo field and the form?
    Rod

    fe_rod@hotmail.com

  3. #3
    Join Date
    Apr 2004
    Posts
    11
    I already used the properties can grow and can shrink but it has no effect on the form... the text displayed is not complete and users can't read the missing information because the field is not enabled because it is in a read-only state. Can u give some solutions to this problem? Thanks!!!

  4. #4
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Lightbulb

    Via VB you can put the Text of the TextBoxes in the ControlTipText, so that when the user stays with the mouse on the text box, the whole text will be displayed in the yellow rectangle.

  5. #5
    Join Date
    Nov 2003
    Posts
    1,487
    Quote Originally Posted by laine
    I have a form that users can access in a read-only state. Some of the information on the form have values that are longer than the width of the bound control on the form. Is there a way I can display the complete text without requiring the user to click in the field and using arrow keys to read the value? How can I display the complete text where users can just move their mouse over the field and it will show the complete text... the fields I want to display is in MEMO type so its impossible to use controltips. I will really appreciate any help!!! thanks in advance!!!
    I thought the same thing till I re-read the post

    I am working on a solution (since it's such an interesting dilemma) but it wont be an easy one. Are the controls in question in fact Enabled or Disabled (grayed out)? If the control(s) are disabled as you had indicated in your last post then things get even more complicated.


  6. #6
    Join Date
    Apr 2004
    Posts
    11
    Quote Originally Posted by CyberLynx
    I thought the same thing till I re-read the post

    I am working on a solution (since it's such an interesting dilemma) but it wont be an easy one. Are the controls in question in fact Enabled or Disabled (grayed out)? If the control(s) are disabled as you had indicated in your last post then things get even more complicated.

    If that's the case, I think I should set the enable and locked property of the field to true so that the feature of the read-only will stay. If I do this, I think it will not be that complicated anymore. Can u please help and tell me on how can I make it possible for the users to just move their mouse over the field and read the complete text. thanks!!!

  7. #7
    Join Date
    Nov 2003
    Posts
    1,487
    The Using the ControlTipText property in the manner that Hammbakka suggests is obviously the easiest way but then again...you are limited to the amount of content.

    I am working on a solution and will post what I come up with into this thread as soon as it is done.


  8. #8
    Join Date
    Jun 2002
    Location
    Saudi Arabia / Philippines
    Posts
    126
    Yes it is a dilemma. Control tips would work if it was not for the size constraint. A memo field can contain up to 64K characters whereas a control tip is limited to 255 characters. (Getting a quart into a pint pot is nothing compared to this.)

    If I understand laine correctly then the requirement is display the complete text when the pointer hovers over the memo field; there should be no user action such as clicking or pressing keys. As far as I know there is no On Hover event available for any of the Access controls, so to fulfil the requirement exactly would mean trawling the market for an independent control that fulfils the requirement. I'm sure there are many but there would be a price tag.

    OK, if the requirement is relaxed and we accept that the user may have to be proactive then there are many ways to display the full text. Most - no all - of the solutions will revolve around popping-up another form dedicated to displaying the memo text and big enough to show all of it. The design consideration comes down to the most convenient way for the user to open and close this pop-up form. Yes, there will have to be some enabled control for this user interaction - but don't forget that the form itself has an On Click and mouse events so it may not be necessary to enable any of the read only controls on the form.

    Some options that occur to me are:

    Mouse Down - open form; Mouse Up - close form.
    Toggle button on main form - one click, open form - next click, close form.
    Button or control on main form to open pop-up - button or control on pop-up to close.

    The third option has the advantage of being simpler and the control that closes the pop-up is not in danger of being obscured by the pop-up itself.
    Rod

    fe_rod@hotmail.com

  9. #9
    Join Date
    Nov 2003
    Posts
    1,487
    Hmmmm.....In any case....like I said, I was indeed working on a solution. Unfortunately I can't spend every breathing moment working out possible solutions to specific dilemmas, so this did take a little longer to post than I had originally anticipated. Without blurting out a bunch of rhetoric of how you might possibly solve this problem and since the solution is rather complex, I have chosen to provide you with a sample form demonstrating the very solution and the code to dissect as you like. It may not completely solve your situation as you would intend it but it does provide a simple sample of the power available using Windows API functions for VBA programmers.

    The sample form provided was quickly created to assist with a post made elsewhere in this forum (regarding another topic) and rather than creating an all new form, I opted to use it. If anything, it shows that the solution provided can be applied to most basic forms (at the very least).

    Rod hit it on the nail….a popup form is the easiest way to go and to display the form as the Mouse pointer is hovered over top of a control. Obviously, for this reason, the MouseMove event for a control is used to fire the function that generates and displays what I call a Tip Form. Now, keep in mind, there are no special ActiveX controls here. Just pure VBA code and some Windows API functions and, it’s free

    What it does:

    When you pass your Mouse Pointer over top of a Form Control such as a TextBox, regardless of the window state (maximized or normal), and that Control has the supplied ShowTip() function entered into the MouseMove event [i.e.: =ShowTip([myControlName])], The Tip Form will display the full contents of that Control (field) directly at the Mouse Pointer location. If the Control (hereafter referred to as SourceControl) contains a child Label, then the label name is also displayed within the Tip Form and is utilized as a Title Bar which, by the way, you can use to pick the Tip Form and drag it around the screen with your mouse.

    What displays on screen is what appears to be a small Tool Tip with a title bar and, depending on the amount of content contained within the SourceControl, the Tip Form is automatically sized accordingly. Since some SourceControl content can be quite large, perhaps several paragraphs, we obviously don’t what the Tip Form to display and take up all the screen realestate. Therefore the Tip Form will only be physically allowed to grow to ten lines of text and only one third the screen width in length (regardless of resolution). Also, the Tip Form should never display beyond the vertical or horizontal screen boundaries. If the Tip Form has reached its’ maximum allowable size then a Scrollbar is automatically placed into the Tip Form so that all the Contents can all be viewed……or edited.

    You see, the Tip Form is also interactive to the SourceControl. For as long as the SourceControl does not have its’ Locked property set to Yes (True), you can edit the contents of the Tip Form and those changes will be automatically placed into the SourceControl when the Tip Form closes.

    To Close the Tip Form, a routine has been placed into the MouseMove event for the Details section of the Form which is home for the SourceControl.


    The Code:

    The bulk of code and API’s necessary for the Tip Form is housed within the Form Code Module itself. Normally you would want to place the API declarations, required Constants, and Type declarations and place them into a database code module. For clarification purposes I decided to have them in the Tip Form module so that it can be easily seen what pertains to what (so to speak).

    Areas of code interest are:
    - the MouseMove events for the controls located on the Main form including the Details section.
    - the Main Form Unload event
    - the OnClick events for both the ComboBox and Listbox located on the Main Form.
    - Functions located within database code module named Module1. In particular the GetScreenBoundries,IsLoaded, and ShowTip functions.
    - All code contained within the Tip Form code module and any events.

    Almost all of the code contained within the Main Form code module was done simply for a individual in another posted topic elsewhere within this forum.

    Note: The Reset Command button located on the main Form also contains a call to the ShowTip function located in its’ MouseMove event. When the mouse passes over the button a message is displayed indicating that the control has no content. I did this deliberately so that you can see what happens when the Tip Form is used on a control that has no content. Delete the function call once you’ve tried it.

    Play with it for a while….it may be useful (?). Make it better. It was developed rather quickly and can definitely use some cleaning up. The code is well documented. I’m sure it will get dissected nicely here


    Enough of this book.…..Hope this helps a little…

    Attached Files Attached Files
    Last edited by CyberLynx; 07-30-04 at 04:25.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •