Results 1 to 9 of 9

Thread: [RESOLVED] there must be another way (ToolStripDropDownButton)

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2001
    Location
    Köln
    Posts
    395

    Resolved [RESOLVED] there must be another way (ToolStripDropDownButton)

    Hi

    I have a

    • StatusStrip with a ToolStripDropDownButton
    • ToolStripDownButton Property is set to "Image and Text"
    • Resourcefile with to pictures (Pic1 and Pic2)


    assign during designmode a Image from the resource file called Pic1 to the property Image

    during the run this Image has to be changed so i did

    VB Code:
    1. if (dropdownbutton.Image.Equals(Resources.Pic1))
    2. {
    3. [INDENT]dropdownbutton.Image = Resources.Pic2;[/INDENT]
    4. }
    5. else
    6. {
    7. [INDENT]dropdownbutton.Image = Resources.Pic1;[/INDENT]
    8. }

    does not work.

    i am using now this methode
    the Tag Property of the ToolStripDropDownButton becomes during design time the value "0"

    VB Code:
    1. if (dropdownbutton.Tag.Equals("1"))
    2. {
    3. [INDENT]dropdownbutton.Tag = "2";[/INDENT]
    4. [INDENT]dropdownbutton.Image = Resources.Pic2;[/INDENT]
    5. }
    6. else
    7. {
    8. [INDENT]dropdownbutton.Tag = "1";[/INDENT]
    9. [INDENT]dropdownbutton.Image = Resources.Pic1;[/INDENT]
    10. }

    There must be a better way ???

    thx
    Last edited by Bongo; Nov 15th, 2006 at 07:10 AM. Reason: Changing Resolved Icon

Posting Permissions

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



Click Here to Expand Forum to Full Width