dcsimg
Results 1 to 10 of 10

Thread: [RESOLVED] Container ideas wanted

  1. #1

    Thread Starter
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,366

    Resolved [RESOLVED] Container ideas wanted

    I have a project request to change what we call “claim flags” that are a single message box to a vertical list of separate icons associated with tool tips. Currently the program concatenates the messages (up to thirteen) associated with a medical claim into a single message box. For example:

    strMessage = “Claim is out of experience” & vbCrLf
    strMessage = strMessage & “Handicaps excluded” & vbCrLf
    strMessage = strMessage & “etc…”
    MsgBox strMessage

    Of course all that is in tables and processed in a loop. I need something vertical and about a half an inch wide. I’ve played around with stacking status bars vertically, pictures in frames, labels, etc. but I’m really not pleased with the appearance. Any suggestions on some kind of container I could use? It needs to be displayed vertically.

  2. #2
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: Container ideas wanted

    Let me see if I got what you are trying to do. You need to display a list of messages stacked vertically, and show an icon/image on the left side of each message?

  3. #3
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,265

    Re: Container ideas wanted

    If baja_yu is correct, I think a ListView or FlexGrid will work well.

  4. #4

    Thread Starter
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,366

    Re: Container ideas wanted

    Quote Originally Posted by baja_yu View Post
    Let me see if I got what you are trying to do. You need to display a list of messages stacked vertically, and show an icon/image on the left side of each message?

    I have some room to be creative with it. Here are my requirements:


    Details: It was decided to add an Icon in addition to the Pop ups which in the long term would not be used anymore.

    Along with those are a screen print where someone just pasted icons vertically along the left side of the form. I’m just trying to come up with ideas right now.

  5. #5
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    18,554

    Re: Container ideas wanted

    So, all that is visible will be the icons? User hovers over them to see the message in a tooltip? Is that the idea? I don't see how you will cram text in a 1/2" display which is approx 48 pixels.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  6. #6
    PowerPoster Spoo's Avatar
    Join Date
    Nov 2008
    Location
    Right Coast
    Posts
    2,656

    Re: Container ideas wanted

    LaVolpe

    I think OP means that just the icons are 1/2 inch wide.
    User hovers over an icon, and tool-tip appears that can
    be as wide as needed to display the text.

    Tyson

    As a possible alternative to Baja's and Si's ideas, if you
    just want icons, maybe something like this ...
    1. Create a PictureBox control array:
      • place 1 PictureBox on your form, name it, say, pbIcon.
      • set Index to 0
      • set its dimensions to be approx 1/2" x 1/2"
      • set Visible = False
    2. In your Form_Load sub, say, load the other 12 PB's in a loop, where you would
      • Load pbIcon(ii)
      • pbIcon(ii).Left = 0
      • pbIcon(ii).Top = pbIcon(ii - 1).Top + pbIcon(ii - 1).Height
      • visible will be False by default (to be set to True on demand)
    3. Create a pbIcon_MouseMove(Index As ...) sub
      • would detect which PB is being moved over
      • would launch the appropriate ToolTip
    4. Create a sub to populate the pbIcon's with appropriate icons, on demand
      • would clear all and "turn off" all PB's when a new database record is encountered
      • would load .Picture with path to appropriate icon, based on database
      • could set .Tag property with a reference so would associate the
        appropriate ToolTip message with said icon

    Does that work for you?


    EDIT:
    • Forget about Step 3.
    • Just do this in Step 4 ...
      • use the .ToolTipText property of the PB.
      • there is no need at all for a special MouseMove sub.
        It just happens by itself!

    Spoo
    Last edited by Spoo; Jun 2nd, 2010 at 02:48 PM.

  7. #7
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: Container ideas wanted

    Here's something based on Spoo's idea. Did you mean something like that? (of course, you need to load the actual images to the picture boxes)

    EDIT: If the default tool tip is enough, like Spoo mentioned in his edit then you don't need most of the code I posted. But if you want to customize the size, font etc, then this is for you. Also, there's a limit on the Tooltip length in VB, I think 255 characters or something like that, or maybe even much less like 64. I cant remember now.

    EDIT2: Just checked. Actually it's a bit of both. 255 is the limit for controls (picturebox at least) and 64 is the limit for the system tray icon.
    Attached Files Attached Files
    Last edited by baja_yu; Jun 2nd, 2010 at 03:07 PM.

  8. #8

    Thread Starter
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,366

    Re: Container ideas wanted

    Quote Originally Posted by baja_yu View Post
    Here's something based on Spoo's idea. Did you mean something like that? (of course, you need to load the actual images to the picture boxes)

    EDIT: If the default tool tip is enough, like Spoo mentioned in his edit then you don't need most of the code I posted. But if you want to customize the size, font etc, then this is for you. Also, there's a limit on the Tooltip length in VB, I think 255 characters or something like that, or maybe even much less like 64. I cant remember now.

    EDIT2: Just checked. Actually it's a bit of both. 255 is the limit for controls (picturebox at least) and 64 is the limit for the system tray icon.
    Thanks to all for responding!

    I like baja yu’s approach for loading the pictures but the form size to display the labels breaks the ½ inch requirement. This is probably from me not giving enough details. The applications main interface is tabbed with around ten tabs depending on the type of employer policy (claims system). I plan on sliding it over a little on the form and adding whatever controls I use so they display no matter what tab is clicked. Taking baja yu’s approach to build the pictures and using code from here (which actually links to this site):

    http://www.bigresource.com/Tracker/Track-vb-dkuMiONXws/

    I think I can give a better idea of what I’m looking for in the attached project. If you don’t want to unzip it the logic is:

    1. Load the pictures as baja yu suggested to keep it dynamic and add the text to the picture tag.
    2. On the move mouse pass the text to form2 which displays the text at the proper location (designed to look like a tool tip).
    3. Unload Form2 when the cursor is off the picture.

    The problem with what I put together is it is too slow. It takes a second or two to change the text when I hover. Any suggestions to get the same effect/logic only faster?
    Attached Files Attached Files

  9. #9
    PowerPoster Spoo's Avatar
    Join Date
    Nov 2008
    Location
    Right Coast
    Posts
    2,656

    Re: Container ideas wanted

    Tyson

    If you are using Kleinma's code, notice that it
    has a Timer control with the Interval = 2000
    as the default setting (on the Properties Window),
    which is 2000 ms, or 2 seconds

    If you like everything about that approach except
    the "delay", perhaps you could just set the
    Interval to something smaller.

    Frankly, however, I'm not quite sure why a Timer
    is needed at all in your case.

    Spoo

  10. #10

    Thread Starter
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,366

    Re: Container ideas wanted

    I went with baja yu's suggestion minus the labels. The users were OK with just the tool tips.

    The timer change fixed the slowness issue but I didn't go that way as I mentioned..

    Thanks to All!

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width