Toolbar Icons.

RandomCoder

Well-Known Member
Licensed User
Longtime 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
 

agraham

Expert
Licensed User
Longtime User
the icons would automatically resize to suit but alas they don't.
Not quite sure what you mean. Icons displayed how? Can you elaborate with a bit of code if possible?

Also, is it possible to set the focus to a Toolbar textbox? Everything I have tried has failed.
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")
 

RandomCoder

Well-Known Member
Licensed User
Longtime 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.
 

klaus

Expert
Licensed User
Longtime User
Hi RandomCoder,

You should add following Parameter to your ToolStripButtons.
B4X:
[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.
 

Attachments

  • ToolStrip.jpg
    ToolStrip.jpg
    3.5 KB · Views: 181

RandomCoder

Well-Known Member
Licensed User
Longtime 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
 
Top