# How to change the style of one block in tikzposter package?

I want to change the style of only one block "Objectives", but at the same time i like theme Desert. I would like this block to have black frame and background color like title of my poster has. Any ideas how to manage it?!

\documentclass[25pt, a1papper, portrait]{tikzposter}
\usepackage[utf8]{inputenc}
\title{\parbox{\linewidth}{\centering dsfds sdfsfd}}
\author{fdssfa}
\date{\today}
\institute{fsdfs sdfdsfds}
\usepackage{blindtext}
\usepackage{comment}
\usetheme{Desert}

\begin{document}

\maketitle

\block{Introduction}
{
\blindtext
}

\begin{columns}
\column{0.4}
{

\colorlet{blocktitlebgcolor}{red}
\colorlet{blockbodybgcolor}{blue}
\colorlet{framecolor}{black}
\useblockstyle{Basic}
\block{Objectives}{\blindtext \vspace{2cm}

}}

\column{0.6}{
\block{Something else}{Here, \blindtext \vspace{4cm}}
\note[
targetoffsetx=-9cm,
targetoffsety=-6.5cm,
width=0.5\linewidth
]
{e-mail \texttt{sharelatex@sharelatex.com}}}
\end{columns}

\begin{columns}
\column{0.5}
\block{A figure}
{
\begin{tikzfigure}

\end{tikzfigure}
}
\column{0.5}
\block{Description of the figure}{\blindtext}
\end{columns}
\block[titleleft,titleoffsetx=2em,titleoffsety=1em,bodyoffsetx=2em,
bodyoffsety=1em,titlewidthscale=.6, bodywidthscale=.8, roundedcorners=14,
linewidth=8mm, bodyinnersep=4em, titleinnersep=2em]
{Sample Block}{Text\\Text\\Text Text}
\end{document}


I am not entirely sure what you are after as your title does not seem to have a black frame, but perhaps this will get you started. You can define a new block style using \defineblockstyle, which allows you to set-up the characteristics of the block as you want them. I have then wrapped this new block inside a \myblock command that can be used to create a single bloc in a particular style. By default, it creates block in the "MyBlock" style but it can be used for any style:

\myblock{title}{content}%           a block in the "MyBlock" style
\myblock[Envelope]{title}{content}% a block in the "Envelope" style


Secondly I have defined the "MyBlock" style to do what I think you want. With this in place your MWE produces:

Here is the full code:

\documentclass[25pt, a1papper, portrait]{tikzposter}
\usepackage[utf8]{inputenc}
\title{\parbox{\linewidth}{\centering dsfds sdfsfd}}
\author{fdssfa}
\date{\today}
\institute{fsdfs sdfdsfds}
\usepackage{blindtext}
\usepackage{comment}
\usetheme{Desert}

\defineblockstyle{MyBlock}{% define a custom style for a block
titlewidthscale=0.8, bodywidthscale=1, titlecenter,
titleoffsetx=0pt, titleoffsety=0pt, bodyoffsetx=0pt, bodyoffsety=15mm,
bodyverticalshift=15mm, roundedcorners=22, linewidth=5pt,
titleinnersep=8mm, bodyinnersep=8mm
}{
\draw[rounded corners=\blockroundedcorners, inner sep=\blockbodyinnersep,
line width=\blocklinewidth, color=black,
top color=titlebgcolor!90, bottom color=titlebgcolor!20!white,
%fill=blockbodybgcolor
]
(blockbody.south west) rectangle (blockbody.north east); %
\ifBlockHasTitle%
\draw[rounded corners=\blockroundedcorners, inner sep=\blocktitleinnersep,
top color=titlebgcolor!90, bottom color=titlebgcolor!20!white,
line width=\blocklinewidth, color=black, %fill=blocktitlebgcolor
]
(blocktitle.south west) rectangle (blocktitle.north east); %
\fi%
}
\newcommand\myblock[3][MyBlock]{\useblockstyle{#1}\block{#2}{#3}\useblockstyle{Basic}}

\begin{document}
\useblockstyle{Basic}

\maketitle

\block{Introduction}
{
\blindtext
}

\begin{columns}
\column{0.4}
\myblock{Objectives}{% use custom block to define the objectives
\blindtext \vspace{2cm}
}

\column{0.6}{
\block{Something else}{Here, \blindtext \vspace{4cm}}
\note[
targetoffsetx=-9cm,
targetoffsety=-6.5cm,
width=0.5\linewidth
]
{e-mail \texttt{sharelatex@sharelatex.com}}}
\end{columns}

\begin{columns}
\column{0.5}
\block{A figure}
{
\begin{tikzfigure}

\end{tikzfigure}
}
\column{0.5}
\block{Description of the figure}{\blindtext}
\end{columns}
\block[titleleft,titleoffsetx=2em,titleoffsety=1em,bodyoffsetx=2em,
bodyoffsety=1em,titlewidthscale=.6, bodywidthscale=.8, roundedcorners=14,
linewidth=8mm, bodyinnersep=4em, titleinnersep=2em]
{Sample Block}{Text\\Text\\Text Text}
\end{document}

• It's almost I wanted except one thing. I would like the style of all future colomns and blocks has the same features as rounded corners, shading and so on. But here "Introduction" and "Something else" have different styles. – David Aug 24 '15 at 7:12
• @David This was how you set it up in your question! To fix this all that you need to do is move the \useblockstyle{Basic} command up to the top of the document. I have just edited my solution so that it does it this way. – Andrew Aug 24 '15 at 7:22