Skip navigation.
Home
The QNX Community Portal

View topic - Grouping custom widgets?

Grouping custom widgets?

Isn't the name clear?

Grouping custom widgets?

Postby jal85 » Mon Mar 23, 2009 3:44 pm

Is there a way to create a custom widget that is comprised of two other custom widgets? I need a way to ensure that a user cannot use these widgets separately and can only be placed on the screen as a group.

The reason I can't just make one widget is that the end widget will comprise of two separate buttons. Is there a way to make two selectable areas within one widget?
jal85
New Member
 
Posts: 7
Joined: Mon Mar 23, 2009 3:25 pm

RE: Grouping custom widgets?

Postby micro » Tue Mar 24, 2009 1:24 pm

Plant them on a pane or really create a custom widget with "Building Custom Widgets"-chapter, which allows you to block special resources
micro
Senior Member
 
Posts: 458
Joined: Thu Jul 22, 2004 8:41 pm

RE: Grouping custom widgets?

Postby maschoen » Tue Mar 24, 2009 3:30 pm

When a button is pressed, your callback can check the mouse pointer location and therefore can distinguish between one side of the button or the other. In this way you can make two selectable areas. There are some visual issues to this approach. For example, regardless where you pressed, the entire button would flex.

I'm not really sure what you mean by ensuring that the user cannot use the widgets separately. Is the user an end user or a programmer?
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm

RE: Grouping custom widgets?

Postby jal85 » Tue Mar 24, 2009 7:23 pm

By user i mean another programmer who is going to create screens. The end widget will look like two separate buttons. Since the two buttons will never be used individually I want to group them together so they cannot be placed on the screen alone.

I essentially want to create a custom widget that consists of two other custom widgets.
jal85
New Member
 
Posts: 7
Joined: Mon Mar 23, 2009 3:25 pm

RE: Grouping custom widgets?

Postby juanplacco » Tue Mar 24, 2009 8:00 pm

You can do that...

I know I'm not helping too much but you can be sure here (somewhere) is what you need:

http://www.qnx.com/developers/docs/qnx_ ... about.html

JM
juanplacco
Senior Member
 
Posts: 318
Joined: Wed May 17, 2006 2:30 pm

RE: Grouping custom widgets?

Postby juanplacco » Tue Mar 24, 2009 8:01 pm

juanplacco
Senior Member
 
Posts: 318
Joined: Wed May 17, 2006 2:30 pm

RE: Grouping custom widgets?

Postby maschoen » Wed Mar 25, 2009 4:26 am

I don't want to seem judgmental but creating a custom widget to enforce control over a programmer seems a little bit extreme. You could (much more easily) use PhAB to create the structure you want and put it in a database. Even that seems a little bit stressed. If you can't count on a programmer putting both buttons on together (by asking them to), then what can you count on them doing?
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm

RE: Grouping custom widgets?

Postby micro » Wed Mar 25, 2009 10:21 am

producing bugs ^^
micro
Senior Member
 
Posts: 458
Joined: Thu Jul 22, 2004 8:41 pm

Postby jal85 » Wed Mar 25, 2009 2:49 pm

I'm creating different custom widgets to represent different physical components throughout a plant.

Each widget is to display several attributes about each piece of hardware in real time, I don't think using PtButtons would be the way to go.
jal85
New Member
 
Posts: 7
Joined: Mon Mar 23, 2009 3:25 pm

Postby jal85 » Wed Mar 25, 2009 2:49 pm

I'm creating different custom widgets to represent different physical components throughout a plant.

Each widget is to display several attributes about each piece of hardware in real time, I don't think using PtButtons would be the way to go.
jal85
New Member
 
Posts: 7
Joined: Mon Mar 23, 2009 3:25 pm

Re: RE: Grouping custom widgets?

Postby maschoen » Wed Mar 25, 2009 2:59 pm

micro wrote:producing bugs ^^

Lol, yes they will, but they will do that no matter what you do. That is part of their job. Of course finding and removing is also.
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm

Re: RE: Grouping custom widgets?

Postby Tim » Thu Mar 26, 2009 5:01 pm

maschoen wrote:
micro wrote:producing bugs ^^

Lol, yes they will, but they will do that no matter what you do. That is part of their job.


Producing bugs is not part of my job.

As a contactor I often remind my employer "I don't charge for bugs, those are free". When they reply "really?". I say "Yup. But I do charge to fix them". :-)

Tim
Tim
Senior Member
 
Posts: 1388
Joined: Wed Mar 10, 2004 12:28 am

Re: RE: Grouping custom widgets?

Postby maschoen » Thu Mar 26, 2009 8:39 pm

Creating bugs has always been part of the job. It's just not a required part. Removing them is required. When you figure out a way to write software that doesn't have any bugs, please let us all know. :-).


Tim wrote:
maschoen wrote:
micro wrote:producing bugs ^^

Lol, yes they will, but they will do that no matter what you do. That is part of their job.


Producing bugs is not part of my job.

As a contactor I often remind my employer "I don't charge for bugs, those are free". When they reply "really?". I say "Yup. But I do charge to fix them". :-)

Tim
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm


Return to GUI Programming

Who is online

Users browsing this forum: No registered users and 4 guests