Toolbar Icons.

Discussion in 'Questions (Windows Mobile)' started by RandomCoder, Jun 13, 2009.

  1. RandomCoder

    RandomCoder Well-Known Member Licensed User

    I'm currently having a play with the ControlsEx library and have stumbled across a problem.

    I'd like to use large icons by making the toolbar thicker. I was expecting that by changing the height of the toolbar the icons would automatically resize to suit but alas they don't. I'm using Icons that have several layers and so I then decided to remove all the layers leaving only the 128x128 size icon, but this still hasn't worked.

    Is there any way that I can use larger icons?

    Also, is it possible to set the focus to a Toolbar textbox? Everything I have tried has failed.

    Kind regards,
    RandomCoder
     
  2. agraham

    agraham Expert Licensed User

    Not quite sure what you mean. Icons displayed how? Can you elaborate with a bit of code if possible?

    Should work with the Door library but I haven't tried because it's too late to bother :). Most ToolStrip controls should support this method.

    Obj1.Value = TsTxtbox.ControlRef
    Obj1.RunMethod("Focus")
     
  3. RandomCoder

    RandomCoder Well-Known Member Licensed User

    Attached is a small example.

    The icon's I'm refering to are those of the buttons, however the tool strip buttons have no height and width properties and so they appear really small.

    Using the door library to set the focus on my text boxes has worked just fine :sign0060:
    I then thought that maybe this is all I need to do for the tool strip buttons, but maybe I have implemented it wrong as I cannot get the buttons any larger :confused:

    Your help as always is greatly appreciated.

    Thanks,
    RandomCoder

    PS I've compressed the files using 7Zip as the file was too large using normal windows file compressor.
     
  4. klaus

    klaus Expert Licensed User

    Hi RandomCoder,

    You should add following Parameter to your ToolStripButtons.
    Code:
    [FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]FrmObject.Value=BtnTSSearch.ControlRef[/SIZE][/FONT]
    [SIZE=
    2][FONT=Courier New]FrmObject.SetProperty([/FONT][/SIZE][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000]"ImageScaling"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2],[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000]"None"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2])[/SIZE][/FONT][/SIZE][/FONT]
    Then the images become bigger.

    In the screenshot below the first 2 buttons have above parameter and the 3rd one not, it is scaled to a 16*16 Pixel image.

    Best regards.
     

    Attached Files:

  5. RandomCoder

    RandomCoder Well-Known Member Licensed User

    Thanks for your help again Klaus.

    I'm nearly finished with my App now, I'll post it when complete.
    At the moment I'm busy decorating, as I have a little one on the way in 6 weeks time :sign0137: (things are a little frantic at the mo!).

    I'll implement the changes later.

    Cheers,
    RandomCoder
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice