How to display image in Krypton Button - winforms

In my existing system Krypton button is been used. I want to display image instead of text in the button. My current Buttonstyle is set as "LowProfile". I am confused about the button style mode in tool kit also. I couldnt find any relevant documents for the ButtonStyle.
So my questions are:
Where can I find the good document/tutorial for the krypton tool kit?
How to display image in the krypton Button?

Image can be added in StateCommon -> Back -> Image -> {Select your image}
Also to visualize the image set Draw to True

Krypton is now open source.
https://github.com/ComponentFactory/Krypton
You can find some examples of KryptonButton in the KryptonExplorer.exe and KryptonButtonExamples.exe demo projects.
Source code for these projects are available here:
https://github.com/ComponentFactory/Krypton/tree/master/Source/Krypton%20Toolkit%20Examples
In these projects, the image is added with Properties, Values, Image, {Select your image}
Otherwise, you can also use: Properties, StateCommon, Back, Image, {Select your image}
The difference between Values and StateCommon seems to be "some padding" and therefore the image is not directly on the border/edge of the button.

Related

How to extend the Wagtail image format modal?

We have a use case where a content editor wants to
right-align an image so text wraps around it and
set the image width so it will scale well in an article.
While the rich text editor allows us to select an image with a right-aligned format, there isn't an option for specifying the image width.
How can I customize the Wagtail "Choose a format" modal to add a new field for image width and use that in the rendered output? I hope to avoid creating additional image formats with possible permutations of image alignment/width since these are two separate properties.
Prior art
See the WordPress Gutenberg image settings UI below for prior art.
Docs: https://docs.wagtail.org/en/stable/advanced_topics/images/changing_rich_text_representation.html#changing-rich-text-representation
# image_formats.py
from wagtail.images.formats import Format, register_image_format
class SubclassedImageFormat(Format):
def image_to_html(self, image, alt_text, extra_attributes=None):
original_html = super().image_to_html(image, alt_text, extra_attributes)
return original_html.replace('class="', 'class="foo')
register_image_format(
SubclassedImageFormat('subclassed_format', 'Subclassed Format', classnames, filter_spec)
)

Wagtail: How to render the blocks dynamically on Admin panel?

In wagtail, I need to make a Struct/Stream Block
There is a dropdown on the top of the block(Image/Video)
If editor choose Image, VideoChooserBlock should be hidden.
And if editor choose Video, ImageChooserBlock should be hidden.
class MyBlock(StruckBlock):
category = ChoiceBlock(choices=(("image", "image"),("video", "video")))
image = ImageChooserBlock()
video = videoChooserBlock()
Here, editor should be able to choose only image or video depending on category.
Any help is appriciated.
Thanks
You may find it useful to review the code of wagtail-link-block which does something similar.
Main files to focus on:
blocks.py for displaying fields conditionally based on a ChoiceBlock
static/link_block/link_block.js and static/link_block/link_block.css to handle the DOM manipulation and styling with JavaScript and CSS
wagtail_hooks.py to insert JS and CSS

React Native : [Expo] Library which capture the main color from an image taken by Camera roll?

I want to take a picture of something and then want to extract the main color from that image.
It will be like when you have a certain item and you want to add its color, But to be exact you want to take a picture of that item and then extract the exact color from that picture and set it against the item.
I have tried looking for it what I found was:
color-thief which failed on react native
react-native-image-color-picker which somehow didn't work either.
I did tried couple of other options from online resources but I couldn't get the desired results.

How to change reference highlight color in ssms 2017?

In ssms2017 text editor, when you click some words(variable/field/tablename..etc), others same words would highlight, but this color not enough HIGHLIGHT, I want change it, but i can't find out the item in Tool>options>font and color.
Go to Tools -> Options -> Environment -> Fonts and Colors.
Under Display items select "Brace Matching (Rectangle)" and change the item background.
https://documentation.red-gate.com/sp7/files/38667551/38863411/1/1410951304827/prompt+change+highlight+color.png
Example Result
What worked for me was using the Highlighted Reference option. This helps when you're using tools like SQL Complete that like to highlight a lot.
Go to Tools -> Options -> Environment -> Fonts and Colors.
Under Display items select "Highlighted Reference" and change the item foreground and background options.

Animated GIFs in Lotus Notes

I have built a HTML email newsletter containing an animated GIF Christmas Ecard which is being sent to all employees of a company who exclusively use Lotus Notes.
The problem I'm having is that they are receiving the email fine, but the GIF isn't animating.
Any idea if there's a way to get this working?
You could ensure that the first frame of the gif looks nice so that the animation is an 'added benefit' rather than a requirement.
That they had one come through last year seems amazing to me. But if that is actually the truth it might have had something to do with the file size being too large. You should try to keep them under 40kb
Click Create in the toolbar above the email message. Click on the Picture option and then choose GIF from the pull-down menu. Go to the folder location of the animated GIF that you want to embed in the email. Click and highlight the file. Click the Import button to add the animated GIF.

Resources