All topics
Yes No
Hide topic messages
Yes No
Enable infinite scrolling
I have a property grid that contains properties ( name value pairs ). In the simplest case, a single property is displayed as a label ( for the name ) and a textbox ( for the value, which can be edited by the user ) displayed on a panel. The panels for all the properties are displayed in a panel with scrollbars.

This code:

form fm( 0, nana::size{ 400, 600 } );
fm.caption("PropGrid2 demo
recent by ravenspoint  ·  1 day ago at 9:55 pm
Hi, when using inputbox show functions i'm getting : error LNK2019: unresolved external symbol "private: void __thiscall nana::inputbox::_m_fetch_args

i use VS Code, build with "cppStandard": "c++17"
cl.exe PCOMMautom.cpp /Fe: PCOMMautom.exe /EHsc /Zi /D W32 /MT /I..., /LIBPATH:....

please, help me to fix

Thank you much

recent by pawiq  ·  Oct 13 at 7:09 pm
Holle posted Sep 18 '18 at 5:48 pm
Hi @ all,
I need help :-(

How can I get the data from a listbox?

Here is a example, what I am searching for:

#include <string.h>
#include <vector>
#include <windows.h>
#include <nana>
#include <nana>
#include <nana>
#include <nana>
#include <nana>

// namespaces
using namespace std;
using namespace nana;

// ------------------
recent by Error Flynn  ·  Oct 6 at 7:56 pm
I can do this in WIN32 like this, but how can I do this in a common way?

HWND hwd = (HWND)fm.native_handle();
SetWindowLong(hwd, GWL_EXSTYLE, GetWindowLong(hwd, GWL_EXSTYLE)|WS_EX_LAYERED );

besh81 posted May 16 at 12:02 pm
Hi All,

I'm working on a new project and I would like to create a customizable layout where the user can show/hide, arrange, move, resize, etc ... several panels.
As reference example think to the MS Visual Studio editor.

I've worked a little with the DOCK field and it seems to be a good start but not yet complete.

Is there someone who use the DOCK field? If yes, what are your impr
recent by ABD  ·  Oct 4 at 1:51 pm
I have tried to fit an image to a button and right now the image is distorted. How to auto fit an image for the nana::button background so that it fills up the button without distorting the image.

The same question goes for auto fitting an icon to a button. In both cased I would like to maintain the aspect ration and fit them in the center of a button.

ABD posted Sep 28 at 3:20 pm
I tried to use \n to create two lines caption for a button but no success.
So, my question is how to have a two or three or more lines on button caption?

Can Jinhao add a method for the nana::button to accept multiline, like this:

button btn_run(fm, nana::rectangle(50, 320, 90, 45));
btn_run.caption("Quit \n this run");
Also, I need to know how to orient text
recent by ABD  ·  Sep 29 at 3:06 pm
kassane posted Sep 28 at 7:01 pm
Today I converted the documentation to docset for use in zeal. But it was not accepted, according to the repository requirements: Nana Docset.

ravenspoint posted Sep 24 at 5:13 pm
What is a nested_form?

I do not understand the documentation

The only code I could find does nothing at all

//class nested_form
nested_form::nested_form(const form& fm, const rectangle& r, const appearance& apr)
: form_base(fm.handle(), true, r, apr)

recent by Error Flynn  ·  Sep 28 at 2:15 am
I prefer to use open source code that is header only ( boost ) or provides an 'amalgamation' of the source code ( SQLite ) that can be added to the applications source, rather than a library that must be pre-built and linked to by the application build.

The advantage is that the developer does not need to ensure that the application and the library have been built with the exact same options,
recent by ravenspoint  ·  Sep 27 at 8:45 pm

I'm trying to compile nana-creator for linux. I downloaded the project and it includes a build/codeblocks_linux folder.

I opened that project and when I gave it to compile I get the following errors:

nana-creator/src/creator.cpp:179:9: error: could not convert ‘nana::filebox::operator()() const()’ from ‘std::vector<std::experimental::filesystem::v1::__cxx11:
recent by kassane  ·  Sep 27 at 6:40 pm
I found an example of using OpenGL with Nana, but it renders on the whole main form. Is it possible to render on a widget instead?

On my application I need two separate OpenGL widgets, apart from a toolbar and other stuff.

I just discovered Nana yesterday, I would very much like to port my FLTK application to it.

ravenspoint posted Sep 11 at 6:10 pm
In general, I need to build v1.7.2 with -std=c++17, otherwise i have problems with std::filesystem.

( Actually v1.7.2 is still broken, so I am using v1.7.2hotfix )

However, this gives me problems using folderbox.


#include <nana/gui/filebox.hpp>
#include <iostream>

int main()
nana::folderbox picker;

auto paths =;
recent by qPCR4vir  ·  Sep 25 at 9:34 pm
huycan posted Aug 31 at 1:48 am
API::tabstop(window) enables a window to receive a tab stop. So how do you disable it? i.e. a TAB key will not move to that window!

recent by qPCR4vir  ·  Sep 23 at 8:16 pm
I wonder what is the difference between the two codes I wrote below.

using namespace nana;

form fm;

// This one works
label lb { fm, rectangle{ 10, 10, 100, 100 } };

// This one doesn't work
label( fm, rectangle( 10, 10, 100, 100 ) )
recent by ravenspoint  ·  Sep 23 at 7:11 pm
MikeMM posted Sep 7 at 8:26 am
I am currently creating a plugin for Adobe After effect and want to use the Nana library for the GUI. After Effect offers me a handle (HWND) of the application and now I want to create a childwindow from it. Is that possible? In the examples of Nana, I've seen that only a modal dialogue is! But I need a class that only accepts a handle (HWND) as a parent?
Thank you

recent by Error Flynn  ·  Sep 10 at 3:36 am
Running the following simple demo and dragging the splitter bar to left (or right) close to the edge cause a crash due to the dock caption text renderer function

#include <nana/gui.hpp>
#include <nana/gui/place.hpp>
#include <nana/gui/widgets/button.hpp>

using namespace nana;

int main()
form fm{ API::make_center(600, 400) };

place p(fm);
p.div("margin=10 doc
recent by besh81  ·  Sep 5 at 4:40 pm
There doesn't seem to be an easy and straightforward way to close a form when Esc is pressed (without resorting to subclassing the window, or registering an event handler for every child widget). form::keyboard_accelerator doesn't work with the escape key.

recent by huycan  ·  Sep 3 at 7:04 pm
label caption not using any of the embedded stuff, just comes out as text. Did it get broken in 1.7.2? or are there other includes or build options needed.

jshanab posted Sep 2 at 9:33 pm
I could not use my primary email for blogs and such, I think it is because the email address contains a hyphen in it.

I am just getting started and I am an experienced wxWidgets user.

First I noticed your provided sln on windows builds builds /MT and /MTd which as i understand it has noting to do with building a static lib. It is not the default and everyone's first project will fail to link. Changing it is fine but the lib name is not modified and that could cause issues. The CMAKE does not seem to address
ravenspoint posted Aug 1 at 3:07 pm
Although it is NOT mentioned in the release notes, it seems to be the case that v1.7.2 suddenly needs c++17.

This is causing a lot of grief, centered around nana::filebox.

The codeblocks library build project is still using C++11. I have changed that and the library itself now builds successfully. But my apps now give

recent by ravenspoint  ·  Aug 26 at 4:35 pm
Nana does not provide an arc drawing primitive, so we have to use the windows API directly. Something like this:

#include <cmath>
#include <nana/gui.hpp>

#include <windows.h>

/** Draw Arc of circle
@param[in] graph context
@param[in] x for conter, pixels 0 at left of window
@param[in] y for center, pixels 0 at top of window
@param[in] r radius, pixels

recent by ravenspoint  ·  Aug 20 at 6:10 pm
huycan posted Aug 20 at 8:20 am
How do you set an event function from inside a class?

For example:

void OnNameChanged(const nana::arg_textbox& arg)

class DbForm : public nana::form
DbForm() : nana::form{}, name{this->handle()}
// the following does not work, NameChanged is a member function;
// the following works, OnNameChange
recent by ravenspoint  ·  Aug 20 at 6:05 pm
Load more
All posts under this topic will be deleted ?
With selected deselect topics
Pending draft ... Click to resume editing
Discard draft