Picturebox controls and memory - memory

I am planning on using many pictureboxes as controls instead of e.g. buttons, mostly because the controls need to look like icons and not buttons. Would pictureboxes kill memory too much when compared with buttons? Is there a way to make a button appear as an icon instead of a picturebox, that is, can a button be made to look like a .png small icon image file instead of a button with no border?
Lastly, there will be several tabs available to the user via a tabcontrol, each of which has maybe 10-15 pictureboxes that can be clicked on. Is there a shortcut for addhandler if many pictureboxes are used within a tab as a replacement for a buttonbar (no longer supported in VB.NET 2010)?

The button control SUPPORTS pictures already!
Most likely too (more importantly!) the buttonis LIGHTWEIGHT and will consume less memory than pictureboxes
Use the Property sheet to assign the image(s)
You can assign a different image for the button up and down states too!!

Related

Create a window with Lua?

So as the title says I need to make code to create a window and add some content to it, like text, images etc, so Is it possible or not?
(note that window needs to be interactive, that means you can code buttons, progress bars, selection boxes etc.)
You cannot do this in Lua alone. There are plenty of libraries and frameworks available that allow you to create graphical user interfaces.
http://lua-users.org/wiki/GraphicalUserInterfaceToolkits

Delphi 2007 - Using TMediaPlayer for non-media applications

I needed a control with Run, Stop and Step buttons and thought I would put a TMediaPlayer to work. It has the buttons I need and I can control the enables and use of colour.
If I drop one onto a form and compile and run - the buttons are all disabled. I unchecked the AutoEnable property and now the buttons are enabled when I run, but as soon as I click any of them I get an error No MCI Device Open.
I get that it's a media player and I haven't told it anything about any media, but is there a way of getting it to run in a media-free environment?
If your question is whether you can use TMediaPleyer buttons to control other things then I'm afraid the answer is NO.
The mentioned buttons are part of TMediaPlayer component itself and are only designed to control the Media Control Interface (MCI) driver.
Their purpose is to make working with MCI driver much easer as you don't need to link bunch of your buttons to the TMediaPleyer component as you would have to do otherwise.
So I'm afraid you will have to make your own set of buttons to do your thing.
You might want to learn about TRadioButton to see how to group multiple buttons together in a way so that only one of them can be pressed down at one time to mimic some functionality of TMediaPlayer buttons.

Custom Dock in Gimp

In GIMP: is there a way how to make my own custom dock (toolbar) where a could put my most used functions?
Something like this:
Create new empty dock or toolbar
Somehow set what functions will be in it
(any of the functions, no matter it has an icon or where in menus is located)
I'd like to have it so I don't have to search in menus every time I need something. I'm aware that I can make keyboard shortcuts but they are difficult to remember since I don't use Gimp every day. I'm used to this from Corel Photopaint and I think it is really useful.
Thanks for your suggestions.
In GIMP 2.8, you can only customize the dockable dialogs - by dragging then around, and in another level, customize tool presets and make use of the tags in the presets dialog to quckly access paint-modes with set brushes, gradients and painting dynamics - so, keeping the tool-presets dialog around, and appropriately using the tags can give you quick access to these settings.
You can't, however, add additional menu entries or icons to select particular plug-ins (filters) - and access those from any of the dockable dialogs. without rebuilding GIMP, you could edit the XML files at /usr/share/gimp/2.0/menus to customize your menus.
In the master branch, the unstable "GIMP 2.9" which will eventually become GIMP 2.10, there is a "search" action implemented, initiated by pressing the / character that will probably make it for the need to quickly find-out any operations wanted.

Delphi XE5 Android TButton colors

I need change color of 50 buttons in one form.
Every button another color and color want to set by code(no design editor).
It is firemonkey mobile application.
By my opinion, without making your own button that doesn't use FMX styles completely (which would break multiplatform compatibility if you are looking forward to support multiple platforms with their native styles), you may apply some filter on top of each of those buttons but on some styles this may cause the text not to be visible, implementing your own filter might get you the desired result:
Effect:=TFillRGBEffect.Create(Self);
Effect.Color:=$80FF0000;
Effect.Parent:=SomeButton;
Another way would be to take advantage of TColorButton with TText on top of it, but this way the entire button won't be filled with your color, but you can modify default/custom style for each platform in order to get what you need (this indeed needs to be done in the designer but you would have to create just one style for each platform you need to support and not 50 for each button):
Button:=TColorButton.Create(Self);
Button.Color:=$80FF0000;
Text:=TText.Create(Button);
Text.Parent:=Button;
Text.Align:=TAlignLayout.alClient;
Text.Text:='Hello';
Text.HitTest:=false;
Button.ClipChildren:=true;
Button.Parent:=Self;

Delphi's ribbon glitchy images

I am trying to use the ribbon control in delphi, but I'm having problems with the icons. I have one ImageList (16x16 - apparently higher resolutions are bad - the ribbon malfunctions) and I want to use it for ribbon icons. But this problem keeps happenning:
When I have the "Large icons" checkbox unchecked, the small buttons (Action2) are fine. But the bigger one is not.
On the other hand, when I tick the checkbox, this happens:
How do I setup the ribbon correctly? This is crazy :/
So, well, I figured it out. In order to use both image types, one has to have two separate ImageLists - each one holding different icons dimensions. The ActionManager has more fields for Images, which I didn't notice first - Images, DisabledImages, LargeImages(that's it!) and LargeDisabledImages. So in order to have the full functionality of the Ribbon, you have to keep 4 ImageLists.
(I am keeping the answer here for future reference)

Resources