All topics
Yes No
Hide topic messages
Yes No
Enable infinite scrolling
I tried to compile nana according to this but I get the following error:

||=== Build: Debug in nana (compiler: GNU GCC Compiler) ===|
C:\nana\source\gui\filebox.cpp||In constructor 'nana::folderbox::folderbox(nana::window, const path_type&, std::__cxx11::string)':|
C:\nana\source\gui\filebox.cpp|1592|error: 'weakly_canonical' is not a member of 'fs'|
||=== Build finished: 1 error(s), 0 wa
recent by jinhao  ·  May 27 at 2:31 am
I'm trying to let the user select some items in a multi-selection listbox, and then pop up a menu when the user right-clicks on the selected items. The problem is that right-clicking resets the selection. Is there any way around that? I think there should be some way to tell the listbox to only allow selecting with left-click. I'm using Nana 1.7.

recent by ABD  ·  May 24 at 8:51 pm
The code below does not let me select multiple folders. I tried Shift+mouse, Ctrl+mouse, Alt+mouse and non of them worked! What am I doing wrong?

int main()
nana::folderbox picker;

auto paths =;
for(auto & p : paths)
recent by ABD  ·  May 19 at 2:55 pm
Jbec posted Apr 5 at 10:06 pm

Nana has an interesting way to align the different widgets. I found this article:

Using colors offers a very clear vision of how widgets are distributed on the screen.

For simple designs it is fine, but for more complex ones it can be a real chaos.

Using nana-creator I recreate a complex window (abo
recent by qPCR4vir  ·  May 10 at 6:49 pm
jinhao posted Apr 9 at 8:31 am
I find that many people use MinGW on Windows, but some redistros don't support standard library and COM well, and the configurations for MinGW and nana are complicated, therefore people often encounter the compiling/linkage errors.

So, I decided to create a simple IDE which would contain a MinGW and compiled nana. Also will provide a package management that can easy to update MinGW and nana,
recent by _-LC-_  ·  May 10 at 2:14 pm
Hello, first of all thanks for your great work! :-)

For the listbox there are two models. Typically, if you have complicated data and you want to avoid data duplication and senseless back and forward conversions, you'd pick the shared_model.
The problem is that this model still forces you to do unnecessary conversions.
If you pick a shared_model and want to handle the container yoursel
recent by _-LC-_  ·  May 7 at 11:35 am

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 Jbec  ·  May 5 at 5:37 pm
Hello , i'm beginner , i'm trying draw pixels form bitmap file (i converted with function convertDataToPixelArray) but it not work . I haven't else idea , can you help me? , sorry my english not good

Link image :

#include <nana/gui.hpp>
#include <nana/gui/widgets/label.hpp>
#include <nana/gui/widgets/button.hpp>
#include <n
recent by ODAKIT  ·  Apr 30 at 4:53 am
Hi there,

I got totally stuck with a problem that I'll try describe below.

It doesn't seem to be a problem with nana to begin with - however I could see that some others already touched this area (multithreading / timers). So we all might learn something new in the end

The skeleton of my app is:

main {
// ...

// A thread-safe event queue (eventpp actually)
recent by wqking  ·  Apr 29 at 2:39 pm
Alison posted Apr 26 at 8:03 am

Love your work, the GUI looks great but is there an example of nana using a window created under SDL2? How do I put buttons etc... on a SDL2 window?

Would be great to see an example using multiple windows. Like this
but with nana widgets on the form(s).


recent by jinhao  ·  Apr 27 at 9:15 pm
I'm using Windows 10 and the latest nana hotfix (tryied from a 1.6.2 compilating as well) and just building a form with nana::appearance(true, false, true, false, false, false, false) wont set it topmost. Is the floating the flag to set it topmost?
EDIT: Idk why I couldn't reproduce this... Sometimes it is topmost, sometimes not.

Also, related to the appearance but not to the floating:

recent by eduardoroeder  ·  Apr 26 at 10:18 pm
ravenspoint posted Apr 23 at 6:15 pm
From the docs:

//Call the show() method to show the inputbox.
//This method blocks the execution until the inputbox gets closed.
//It returns true if the user clicks OK button, or false otherwise.
if (, gender, birth, height, kids))
However, I can keep on clicking and get multiple copies of the box

recent by ravenspoint  ·  Apr 25 at 2:41 pm
Dev++ posted Mar 24 at 2:53 am
I want to make a title panel and then a vertical grid that centers the items.

Like this:

The title would be the top,
The items would be each sound effect panels.

<title><<<><vert weight=544 node><>>>
isnt working, im trying more and will update.
Thank you again

recent by eduardoroeder  ·  Apr 22 at 3:04 pm
Dev++ posted Apr 20 at 9:26 pm
TLDR: How do I set the height and width of a vertical field nana::place (div-text)

This is my app:
This is the div-text:

"<><vert weight=544 node><>"
The nana::place is resizing the panel, which I dont think is ever useful. Also not what I want nevertheless

This is my goal:

The Real Question: (MOST Simplified code & picture)

#include <nana
recent by qPCR4vir  ·  Apr 21 at 8:50 am
janmarc posted Apr 17 at 2:27 pm
Hi all,

I have a setup where I want to interact with one widget, in this case scroll to zoom in, and I want a label that is somewhere else to update it's caption to represent the current zoom level.

The label however doesn't update untill I resize the window or force it to redraw some other way.

Is this the expected behavure?
If yes, is there a way to tell it explicitly I would lik
recent by janmarc  ·  Apr 19 at 9:50 am
@jinhao is parsing the first / or \ as a node intended? Because if you use the default xPath from other libraries it generates / as the first character from the root documents (eg pugixml).
I've seen the commit but idk if this is intended. Can you check it out?

I've got a
recent by eduardoroeder  ·  Apr 19 at 7:32 am
Hey guys... Just wrote a big text here and idk why it emptied. I'll try to replicate the contents.

The purpose of this thread is to discuss the proper practice into multi-form initialization/maintenance. I'll show up my current setup and then open a few questions. Since I'm writing on phone I won't post any code right now, but if you want, just ask for it that I can send the current code.
recent by jinhao  ·  Apr 17 at 8:00 am
I have 20 radio buttons in a radio group. I would like to trigger a model recalculation when any of them are clicked. AFAIK, I now need to register an event handler for each radio button. It is not a huge amount of code, but it is very tedious. Would it be possible to register just one click handler for the entire group?

nana::radio_group rg( fm );
rg.Add( cb1 );
recent by jinhao  ·  Apr 15 at 9:04 pm
qPCR4vir posted Apr 4 at 9:27 pm
The following is based on what I wrote back in February-2014 but it is surprisingly actual and I would want to know yours opinions.

I can see different kind of documentation and this is what I think about it:

The “official”: (author driven)
A general document. Generated independently of the nana source code. It is somewhat stable and therefor approximately actualized to some n
recent by ravenspoint  ·  Apr 11 at 11:45 pm
Dev++ posted Apr 7 at 1:35 am
Ok, here's one that ive been holding off asking for a while.....
There is the graphics::blur method, but is there any way of creating a line or round rectangle (circle) with antialiasing?
Obviously I have googled and found algoritms such as
Xiaolin Wu's line algorithm
recent by jinhao  ·  Apr 7 at 7:15 am
Dev++ posted Apr 4 at 12:18 am
So basically, the scrolling doesnt update the panels within it to show or not.

I have a content panel that has some red boxes in it that are also panels.
When I scroll these into view (which is essentially moving the content panel upwards), it isn't red, but default color.

Here is an example

form fm{ {100,100,800,600} };
panel<true> content{ fm,{0,0,1000,2000} };//th
recent by Dev++  ·  Apr 5 at 2:10 pm
This code works as expected. Each time the mouse is clicked on the form, the checked radio button changes.

#include <nana/gui.hpp>
#include <nana/gui/widgets/checkbox.hpp>

int main()
// construct application form
nana::form fm( nana::rectangle( 100,100, 300, 300 ));

nana::checkbox cb1( fm, nana::rectangle( 10,10,50,20));
recent by Dev++  ·  Apr 4 at 12:22 am
ravenspoint posted Mar 29 at 2:14 pm
What do the nana library designers consider the correct way to change the display when a widget is updated?

Some widgets, for example a label, automatically update their display when they are updated without the coder being required to do anything more.

myLabel.caption("New label");
Other widgets, for example a combox, do not update the display when they are updated. The code must add va
recent by ravenspoint  ·  Mar 31 at 11:38 pm
I have done this dozens of times, but this time it doesn't work! What am I missing?

#include <nana/gui.hpp>

int main()
// construct application form
nana::form fm( nana::rectangle( 100,100, 300, 300 ));[](const nana::arg_mouse&arg)


// show & run;

produces compiler errors

g++.exe -Wall
recent by Dev++  ·  Mar 31 at 3:19 am
Load more
All posts under this topic will be deleted ?
With selected deselect topics
Pending draft ... Click to resume editing
Discard draft