|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
fxscrollwindowHi again everyone. Quick question about FXScrollWindow: is it just me, or does the setPosition() function not work? whenever i call the call the function the scroll bar never moves. Any suggestions as to why this is happening?
-Nate ------------------------------------------------------------------------------ OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get _______________________________________________ Foxgui-users mailing list Foxgui-users@... https://lists.sourceforge.net/lists/listinfo/foxgui-users |
|
|
Re: fxscrollwindowOn Tuesday 02 June 2009, n d wrote:
> Hi again everyone. Quick question about FXScrollWindow: is it just me, or > does the setPosition() function not work? whenever i call the call the > function the scroll bar never moves. Any suggestions as to why this is > happening? It may be due to the following causes: 1) FXScrollWindow's child (contentWindow) has a size which is smaller than the FXScrollWindow's viewport. Obviously, in such a case it never needs scrolling. Depending on the flags, scrollbars may or may not be visible. 2) You've turned scrolling off. 3) The contentWindow's layout hints are such (e.g. LAYOUT_FILL_X or LAYOUT_FILL_Y) that it will be placed to fill the viewport area. 4) It does scroll, but has no change to repaint. These are some of the things I can think off... - Jeroen -- +----------------------------------------------------------------------------+ | Copyright (C) 23:30 06/ 2/2009 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+ ------------------------------------------------------------------------------ OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get _______________________________________________ Foxgui-users mailing list Foxgui-users@... https://lists.sourceforge.net/lists/listinfo/foxgui-users |
|
|
Re: fxscrollwindowThanks for the quick response. I think if anything, the 4th problem listed might be it. The scrollbars do show up, and I can scroll them with the mouse, but the point of what im doing is to set the placement with setPosition(). In any event, I still don't know how to solve the problem >_<.
2009/6/3 Jeroen van der Zijp <jeroen@...>
------------------------------------------------------------------------------ OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get _______________________________________________ Foxgui-users mailing list Foxgui-users@... https://lists.sourceforge.net/lists/listinfo/foxgui-users |
|
|
Re: fxscrollwindowIt seems that setPosition actually is working, but the function that updates the position of the scrollbar is being called art the wrong time. the idea is that it is continuously called, so for FXMAPFUNC i used the message type as SEL_UPDATE. However, it seems the widget is only updated when the mouse moves over it in an up or down fashion. Any reason why this might happen? I will also provide code if that is at all helpful. Also, how does one tell when the scroller has reached the end of the scrollbar?
Here is the widget I am trying to make: class newWidget: public FXHorizontalFrame { FXDECLARE(newWidget) protected: newWidget(){} FXLabel* label; FXScrollWindow* scroll; FXString text; FXString adjustText(FXString labelText) { // this might need work later on double w = scroll->getWidth(); w *= 1.5; for(int l = 0; l < (w/2); l++) { if(l < (w/4)) { labelText.prepend(" "); } else { labelText.append(" "); } } return labelText; } public: newWidget(FXComposite* p,FXObject* tgt=NULL,FXSelector sel=0, FXString labelText="", FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=DEFAULT_SPACING,FXint pr=DEFAULT_SPACING,FXint pt=DEFAULT_SPACING,FXint pb=DEFAULT_SPACING,FXint hs=DEFAULT_SPACING,FXint vs=DEFAULT_SPACING): FXHorizontalFrame(p,opts,x,y,w,h,pl,pr,pt,pb,hs,vs) { scroll = new FXScrollWindow(this,opts|VSCROLLING_OFF|HSCROLLER_NEVER,x,y,w,h); label = new FXLabel(scroll,adjustText(labelText),0,opts,x,y,w,h,pl,pr,pt,pb); text = labelText; target = tgt; message = sel; } void setText(FXString labelText) { label->setText(adjustText(labelText)); text = labelText; } void UpdText() { label->setText(adjustText(text)); } void UpdPosition() { // need this to test if end of scrollbar is reached if(1 == 1) { int x = scroll->getXPosition(); scroll->setPosition(x-2, 0); } else { scroll->setPosition(0, 0); } } };
2009/6/3 Jeroen van der Zijp <jeroen@...>
------------------------------------------------------------------------------ OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get _______________________________________________ Foxgui-users mailing list Foxgui-users@... https://lists.sourceforge.net/lists/listinfo/foxgui-users |
|
|
FOX 1.6.36 and 1.7.19 Linux/X11 user-hostile bug
There is a nasty bug in FOX (1.6.36 and 1.7.16 and as best I can tell
the whole 1.6.x. and 1.7.x series and maybe before) where, after a key
press of a key that is mapped to an accelerator, FOX "grabs" the
XServer and then ignores all mouse clicks and mouse motion if the
window handles the SEL_KEYPRESS event. This leaves not only the FOX
application hung, it leaves the whole desktop hung; completely
unresponsive to all mouse movement and clicks! Needless to say, this
leaves users beyond angry.
The situation is recoverable - just repeat the key press. But this is a wholly non-obvious recovery step! Application users who encounter the bug often resort to reboots to clear the problem until informed of the work-around. To see the problem for yourself with FOX's own imageviewer test program and just a very small modification:
-- Hal Brand *** imageviewer.cpp.orig 2009-01-19 18:05:39.000000000 -0800 --- imageviewer.cpp 2009-06-04 15:41:27.000000000 -0700 *************** *** 61,66 **** --- 61,67 ---- long onCmdScale(FXObject*,FXSelector,void*); long onCmdCrop(FXObject*,FXSelector,void*); long onUpdImage(FXObject*,FXSelector,void*); + long onKey(FXObject*,FXSelector,void*); public: enum{ ID_ABOUT=FXMainWindow::ID_LAST, *************** *** 220,227 **** --- 221,234 ---- FXMAPFUNC(SEL_UPDATE, ImageWindow::ID_MIRROR_BOTH,ImageWindow::onUpdImage), FXMAPFUNC(SEL_UPDATE, ImageWindow::ID_SCALE, ImageWindow::onUpdImage), FXMAPFUNC(SEL_UPDATE, ImageWindow::ID_CROP, ImageWindow::onUpdImage), + FXMAPFUNC(SEL_KEYPRESS, 0, ImageWindow::onKey) }; + long ImageWindow::onKey(FXObject*,FXSelector,void*) + { + return 0; + } + // Object implementation FXIMPLEMENT(ImageWindow,FXMainWindow,ImageWindowMap,ARRAYNUMBER(ImageWindowMap)) *** imageviewer.cpp.~1~ 2009-03-12 22:45:10.000000000 -0700 --- imageviewer.cpp 2009-06-04 15:33:15.000000000 -0700 *************** *** 74,79 **** --- 74,80 ---- long onCmdScale(FXObject*,FXSelector,void*); long onCmdCrop(FXObject*,FXSelector,void*); long onUpdImage(FXObject*,FXSelector,void*); + long onKey(FXObject*,FXSelector,void*); public: enum{ ID_ABOUT=FXMainWindow::ID_LAST, *************** *** 238,245 **** --- 239,252 ---- FXMAPFUNC(SEL_UPDATE, ImageWindow::ID_MIRROR_BOTH,ImageWindow::onUpdImage), FXMAPFUNC(SEL_UPDATE, ImageWindow::ID_SCALE, ImageWindow::onUpdImage), FXMAPFUNC(SEL_UPDATE, ImageWindow::ID_CROP, ImageWindow::onUpdImage), + FXMAPFUNC(SEL_KEYPRESS, 0, ImageWindow::onKey) }; + long ImageWindow::onKey(FXObject*,FXSelector,void*) + { + return 0; + } + // Object implementation FXIMPLEMENT(ImageWindow,FXMainWindow,ImageWindowMap,ARRAYNUMBER(ImageWindowMap)) ------------------------------------------------------------------------------ OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get _______________________________________________ Foxgui-users mailing list Foxgui-users@... https://lists.sourceforge.net/lists/listinfo/foxgui-users |
|
|
|
| Free embeddable forum powered by Nabble | Forum Help |