All topics
499
Yes No
Hide topic messages
Yes No
Enable infinite scrolling
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 } };
lb.caption("caption").bgcolor(colors::azure);

// This one doesn't work
label( fm, rectangle( 10, 10, 100, 100 ) )
.caption("caption")
2replies
28views
recent by ravenspoint  ·  Sep 23 at 7:11 pm
MikeMM posted Sep 7 at 8:26 am
Hi,
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

1replies
22views
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
1replies
18views
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.

3replies
23views
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.

0replies
8views
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.

0replies
5views
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
0replies
8views
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

C:\Users\James\code\nana-1.7.2\build\codeblocks\libnana.a(filebox
14replies
70views
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

5d54260006bce.png
2replies
28views
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
{
public:
DbForm() : nana::form{}, name{this->handle()}
{
// the following does not work, NameChanged is a member function
name.events().text_changed(NameChanged);
// the following works, OnNameChange
4replies
29views
recent by ravenspoint  ·  Aug 20 at 6:05 pm
ravenspoint posted Aug 14 at 11:06 pm
I write code, over and over again, that looks like this:

fm.events().some_event([&](const nana::some_arg&arg)
{
// do some work in response to event
...

nana::API::refresh_window( fm );

});
Why????

nana::API::refresh_window() is not documented. I have been told that it is not documented because it should not be needed. But without it the display does not get update
10replies
49views
recent by ravenspoint  ·  Aug 15 at 8:53 pm
Hi,
I am creating a debugger, and want to continously show the value of a register, and also allow modifying it’s value.
I have looked at using nana::inputbox::integer, but I haven’t found a way to either automatically, or explicitly (button) refresh the associated value. Also, inputbox::integer is probably unsuitable for 64-bit registers.
I would really appreciate a suggesti
2replies
23views
recent by jinhao  ·  Aug 6 at 3:36 am
ravenspoint posted Aug 2 at 4:25 pm
Building

//Include nana/gui.hpp header file to enable Nana C++ Library
//for the program.
#include <nana/gui.hpp>
#include <nana/gui/widgets/label.hpp>
#include <nana/gui/filebox.hpp>
#include <nana/gui/msgbox.hpp>
int main()
{
//All names of Nana is in the namespace nana;
using namespace nana;
//Define a form object, class form will create a window
//
2replies
20views
recent by jinhao  ·  Aug 5 at 5:10 pm
elbui3 posted Jul 18 at 11:33 am
Hello all! I just started using nana libraries for implementing user interfaces. I am following the simple notepad tutorial, but when I build the project, during linking I get these errors:

/home/stefano/Projects/nana/source/gui/filebox.cpp:161: undefined reference to `nana::detail::theme::theme()'
/usr/bin/ld: /home/stefano/Projects/nana/source/gui/filebox.cpp:163: undefined reference to `na
4replies
29views
recent by jinhao  ·  Jul 20 at 11:28 am
Why is it called a "model"? Am I correct in assuming that it's part of the "model-view-adapter" software engineering concept?

model: the STL container provided by the user
view: the listbox, handled by the library
adapter (mediating controller): the user-provided functions that translate between container value and listbox cell??

1replies
15views
recent by jinhao  ·  Jul 18 at 4:30 pm
Hello,

I just upgraded nana v1.6.1 to v1.7.1.
As you know, some file constructor is removed v1.7.1 so I rewrote my code as follows:

// MyAppDlg inherits nana::form
void MyAppDlg::onBrowseVideoSource(int32 index)
{
// _filebox is std::unique_ptr<nana::filebox>
_filebox.reset(new nana::filebox(*this, true));
_filebox->add_filter("All Files", "*.*");
_filebox->
3replies
26views
recent by elbui3  ·  Jul 18 at 3:10 pm
mariusm posted Jun 25 at 2:28 pm
I need to make a function which open new form. In this form need to use mouse event and change label caption. Need this form to open many times.

bool openHold() {
using namespace nana::gui;

form fm(nana::rectangle(20, 20, 300, 300));
fm.caption(L"Hello World");

static label lm(fm);
lm.caption(L"Hello, world!");
button change(fm), quit(fm);
change.caption(L"Change
5replies
31views
recent by Error Flynn  ·  Jun 26 at 9:14 pm
qPCR4vir posted Jun 26 at 8:19 am
https://stackoverflow.com/questions/56759600/text-over-picture


0replies
12views
mariusm posted Jun 22 at 2:21 pm
I want to build a program with system tray. For this I used WINAPI WinMain

When I close the program using LRESULT CALLBACK WindowProcedure I get this error: Nana.Gui detects a memory leaks in window_manager, 2 windows are not uninstalled

I try nana::API::exitall() but get error: 'exitall' : is not a member of 'nana::gui::API

I use Visual Studio 2008

2replies
11views
recent by mariusm  ·  Jun 25 at 2:22 pm
The nana::group caption and nana::checkbox caption are behaving strangely in certain PC. In one PC everything is fine and in some others, the caption is chopped or none existent!

I guess it is some sort of buffer corruption in the nana library.

4replies
76views
recent by ABD  ·  Jun 12 at 2:23 pm
wertex posted Jun 12 at 9:39 am
Is it possible with nana API create textbox component, that support simple html and show small icons (like in telegram messages)?

0replies
10views
Load more
All posts under this topic will be deleted ?
With selected deselect topics
Pending draft ... Click to resume editing
Discard draft