Questions and Answers
Need help? Post your questions here and other people will give you answers.
325
Topics
1.74k
Posts
13
Followers
Yes No
Hide topic messages
Yes No
Enable infinite scrolling
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.

Code:

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

int main()
{
nana::folderbox picker;

auto paths = picker.show();
if(paths.empty())
9replies
43views
recent by huycan  ·  6 days ago at 5:57 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!

5replies
30views
recent by huycan  ·  Sep 11 at 1:23 am
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
20views
recent by Error Flynn  ·  Sep 10 at 3:36 am
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")
0replies
16views
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
7views
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
64views
recent by ravenspoint  ·  Aug 26 at 4:35 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
24views
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
45views
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
21views
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
15views
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
28views
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
13views
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
25views
recent by elbui3  ·  Jul 18 at 3:10 pm
Load more
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft