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

SWT controls example

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Forum Index -> DWT
View previous topic :: View next topic  
Author Message
bobef



Joined: 05 Jun 2005
Posts: 269

PostPosted: Wed Dec 28, 2005 4:29 am    Post subject: SWT controls example Reply with quote

Here is what I've noticed:

Group: SHADOW/SHADOW_ETCHED/etc looks the same; when disbled looks like enabled unlike Win32
Shell: When having ON_TOP style it always looks like toolwindow (no maximize/minimize/icon)
Toolbar: no wraping
CCombo: when the drop down button is pressed the focus is taken away from the shell; the drop down is activated on mouse up not on mouse down like usual
CTabFolder: tabs are activated on mouse up or on mouse drag not on mose down like usual
Back to top
View user's profile Send private message
Shawn Liu



Joined: 09 Mar 2005
Posts: 104
Location: Shanghai, China

PostPosted: Wed Dec 28, 2005 7:49 am    Post subject: Reply with quote

The result I compared with Eclipse/Java "controls example".

Group: SHADOW/SHADOW_ETCHED/etc looks the same; When you have text title with the group, it showes a disabled states.
Shell: a combination of ON_TOP|TITLE|BORDER|MIN|MAX style will get a on top normal looking shell. Try the controlexample.
Toolbar: no wraping; the java example has no wraping either. I don't know whether the CoolBar can help you.
CCombo: is a combination of 4 widgets. Text, List, Shell, Button. No 2 shell gets focus at the same time. "Combo" is such a widget which is a wrapper of the win32 common control "COMBO".
CTabFolder:both Left/Right mouse button down cause a active tabitem switch. Only there is a delay with the left button. Don't know why, maybe on purpose.
Back to top
View user's profile Send private message
bobef



Joined: 05 Jun 2005
Posts: 269

PostPosted: Wed Dec 28, 2005 8:45 am    Post subject: Reply with quote

Quote:
Shell: a combination of ON_TOP|TITLE|BORDER|MIN|MAX style will get a on top normal looking shell. Try the controlexample.


Nope it is still a toowindow

Quote:
Toolbar: no wraping; the java example has no wraping either. I don't know whether the CoolBar can help you.


Strange. I thought there should be wraping because of the SWT.WRAP flag and ToolBar.getRowCount()
Back to top
View user's profile Send private message
Shawn Liu



Joined: 09 Mar 2005
Posts: 104
Location: Shanghai, China

PostPosted: Thu Dec 29, 2005 12:33 am    Post subject: Reply with quote

bobef wrote:
Nope it is still a toowindow


This is done on purpose. See shell.d the method

Code:
int widgetExtStyle() {
// ...
if ((style & DWT.ON_TOP) != 0) {
bits |= OS.WS_EX_TOOLWINDOW;
}
//...
}


don't known why.
Back to top
View user's profile Send private message
Shawn Liu



Joined: 09 Mar 2005
Posts: 104
Location: Shanghai, China

PostPosted: Thu Dec 29, 2005 2:14 am    Post subject: Reply with quote

I checked the Java source code SWT3.02 against SWT3.10. SWT 3.10 has updated this method. I think the parentless window can have ON_TOP style without TOOLWINDOW styled forced in 3.10.

I will update this part of code in DWT as well. later.
Back to top
View user's profile Send private message
Shawn Liu



Joined: 09 Mar 2005
Posts: 104
Location: Shanghai, China

PostPosted: Thu Dec 29, 2005 8:08 pm    Post subject: Reply with quote

A snippet of toolbar wrapping is here:

http://www.eclipse.org/swt/snippets/

create tool bar (wrap on resize)

http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet49.java?rev=HEAD&content-type=text/vnd.viewcvs-markup
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Forum Index -> DWT 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