FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Where is GTK_WIDGET_SET_FLAGS??

 
Post new topic   Reply to topic     Forum Index -> gtkD
View previous topic :: View next topic  
Author Message
hasan



Joined: 02 May 2005
Posts: 58

PostPosted: Thu Jun 11, 2009 5:21 pm    Post subject: Where is GTK_WIDGET_SET_FLAGS?? Reply with quote

Hi, I'm new to both GTK in general and gtkD,

I'm trying to create a custom widget based on DrawableArea, and I want it to grabFocus, but apparently it's not working because I have to set the GTK_CAN_FOCUS flag, I managed to find out where that flag is:

Code:

import gtkc.gtktypes;

WidgetFlags.CAN_FOCUS


But that's not enough, I have to set it!!

How?

I tried to just call this.setFlags, but well, it didn't work.

I spent hours browsing through docs and trying various things, to no avail.

So please help.
Back to top
View user's profile Send private message
Mike Wey



Joined: 07 May 2007
Posts: 428

PostPosted: Sat Jun 13, 2009 5:16 am    Post subject: Reply with quote

The macros aren't wrapped currently.

For CAN_FOCUS you could use the property though:

setProperty("can-focus", 1 );
Back to top
View user's profile Send private message
hasan



Joined: 02 May 2005
Posts: 58

PostPosted: Sat Jun 13, 2009 6:48 pm    Post subject: Reply with quote

Mike Wey wrote:
The macros aren't wrapped currently.

For CAN_FOCUS you could use the property though:

setProperty("can-focus", 1 );


Thanks! that did it Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> gtkD All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group