In Delphi, how can I make a button appear on top of a TCheckListBox? - delphi

We want a list box with check boxes and formatted text. We get that using a TCheckListBox in owner-draw mode.
But we would like to also have a button appear at the right end of the selected row. Just adding a button (TSpeedButton) with the CheckListBox as the Parent doesn't get drawn correctly.
Does anyone know how to do this?

Related

How to get red distance lines in storyboard Xcode?

Watching a tutorial and it looks like the guy is holding down a button to show the distance between his selected view and what's around it.
I've tried command, option, control, and every other button I can think might work. What button needs to be held to get these lines?
By pressing option key only on your keyboard.
Select an element, and move the mouse while pressing the option key, it will show the red lines with the distances.
Hovering over another element will show you the distance between the selected element and that element.

How to set the selective captions for TActionToolbar?

I have a TActionToolbar...But there's one "feature" I can't quite figure out how to control.
From the customize dialog (Vcl.CustomizeDlg.TCustomizeDlg) for a TActionToolbar. Note the caption options listbox:
So how exactly do you use selective captions? Right now it appears to be identical to "full" captions, as I can't seem to piece together how you tell Delphi which buttons should display selective captions (or what the selective caption wording should be if it is customizable)
TAction doesn't seem to have any properties that appear to relate to selective captions. The description and examples for TCaption didn't seem to get any hints either.
...Or is this just one of those cases where Delphi is showing some sort of standard windows dialog including features Delphi doesn't actually support?
So how exactly do you use selective captions?
As the same suggests it, it allows to have some buttons showing their caption and some others to don't show it.
Once you've set the action in your toolbar, click on the button. Then go in the inspector and go to the property "ShowCaption" and set it to false. For each button you will do that, the caption will be hidden.
I will try to place a graphic here showing that.
1-click the tool button
2-go to the object inspector
3-see the "ShowCaption" property and set it to "false"
4-then see the result, the first button is now showing its caption
I use that from time to time to gain some space on a toolbar with too much button to hide the caption on some obvious button.

Listbox Vertical Scrolling Arrows

What do you check to see if the up or down arrow in the listbox vertical scroll bar were clicked.
Looked at dozens of post all over the web and no answer.
What I want to do is if they click up or down then make the next visible item in the list the selected one. Make it highlighted.
thanks all
It looks like the control won't do it natively. You will need to implement it yourself. You can use this post as a guideline:
http://www.codeproject.com/Articles/7554/Getting-Scroll-Events-for-a-Listbox
Note that you will need to handle the WM_VSCROLL message rather than the WM_HSCROLL message as depicted in the code sample.

Animate only a part of an element

how can I animate only a part of an element?
I show/hide a div using jquery-ui's show method but I'd like to start/end the animation from/to a given height of the element.
My dev website can be seen here (link removed). When clicking on the 'Contact' button the contact page shows up or hides if it's already open. Since I couldn't find how to starts my animation from a given height I added a fixed button when it's closed, but when the contact button of the contact page overlaps the fixed button when it's closing...
Any help welcome!
looking for something like this??
http://jsfiddle.net/rlemon/F6Efp/8/
You can also add any fade or whatever effects. This is using a single button to animate both open and close. You could also attach a attribute to the button tag to define it's current state.

How to set the glyph for a toolbar button to blank?

I add a toolbar with some standard Delphi components to my application. Unfortunately, the stupid arrow is first glyph (does anyone even know what it is for?)
I would like to destroy it totally, or, at least, set itcs icon to blank, so that it blends in with the toolbar.
How can I do this?
I need some code which can be executed twice without causing an exception. Thanks
TToolButton gets its image from combining its ImageIndex property with the enclosing toolbar's Images property, which refers to a TImageList. To make a toolbar button have no image, assign ImageIndex := -1.
To remove the glyph from a TSpeedButton at design time, select the button, and then select the Glyph property in the Object Inspector. Press Del to clear the property. To do the same at run time, assign Button.Glyph := nil.
If you have a pre-made toolbar, such as TMediaPlayer or TDBNavigator, then you can't customize the buttons. They always show the arrow glyphs that are hard-coded in the control. You can choose to hide or show certain buttons, though. If you placed the control just to get a row of buttons and have no intention of using them to play media or navigate a database, then don't use that control. Just place a TPanel and put standalone buttons on it.

Resources