bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird positioning of widgets within cdk screens


From: Elliot Li
Subject: Re: Weird positioning of widgets within cdk screens
Date: Sun, 29 Nov 2015 19:59:58 -0800

> On Nov 29, 2015, at 5:40 PM, Thomas Dickey <address@hidden> wrote:
> On Thu, Nov 26, 2015 at 09:09:36PM -0800, Elliot Li wrote:
>> I’m having this problem when trying the cdk library.  I created several new
>> WINDOW and ran initCDKScreen() on them to manage different collection of
>> widgets.  After that I create cdk widgets in these screens.  However the xpos
>> and ypos I used for widgets seem not right.  For one screen, (0,0) is the top
>> left corner of the screen, which is correct, but (1,1) is not at location
>> (1,1) but at (1,1); (1,2) is shown at (1,1).  For another screen, (5,5) is
>> shown at (0,5).  I don’t know if this is random or if I did something very
>> wrong.
>> 
>> Do you guys have any clue why this can happen? Thanks in advance.
> 
> offhand, no - a simple test-program illustrating the problem helps.

I’ve done some more experiments, and it seems that cdk functions always take an 
absolute coordinate (relative to the root full-screen window) no matter what 
screen I passed to them. So in order to put some widget at the top-left corner 
of a sub-screen I cannot just use (0,0), but have to use (x, y) instead, where 
x, y is the location of the sub-screen. Widgets that are placed outside the 
region of the sub-screen will be moved into the subscreen according to some 
rule, it seems to me.

Is that how cdk functions supposed to behave?

—
Elliot


reply via email to

[Prev in Thread] Current Thread [Next in Thread]