Hi Roger,
did you check the buttonxp program open maximised?
was it blinking when the screen maximized?
Thanks
Ankit
Autoresize with XBPDLG_FRAMESTAT_MAXIMIZED)
Re: Autoresize with XBPDLG_FRAMESTAT_MAXIMIZED)
Sorry, I have been away on a vacation.
I see what you are complaining about.
I will look into the matter today.
I see what you are complaining about.
I will look into the matter today.
The eXpress train is coming - and it has more cars.
Re: Autoresize with XBPDLG_FRAMESTAT_MAXIMIZED)
I think I have a solution to your problem.
The BUTTONXP sample program is using the AUTORESIZE clause of DCGETOPTIONS.
This was a very old resizing option that was added to eXpress++ about 13 years ago.
Since that time, I improved the resizing system of eXpress++ and it has a new design which uses resizing rules.
The new system does not have the flicker problem.
Change this:
DCGETOPTIONS ;
AUTORESIZE
To this:
DCGETOPTIONS ;
RESIZE RESIZEDEFAULT DCGUI_RESIZE_AUTORESIZE
The BUTTONXP sample program is using the AUTORESIZE clause of DCGETOPTIONS.
This was a very old resizing option that was added to eXpress++ about 13 years ago.
Since that time, I improved the resizing system of eXpress++ and it has a new design which uses resizing rules.
The new system does not have the flicker problem.
Change this:
DCGETOPTIONS ;
AUTORESIZE
To this:
DCGETOPTIONS ;
RESIZE RESIZEDEFAULT DCGUI_RESIZE_AUTORESIZE
The eXpress train is coming - and it has more cars.
Re: Autoresize with XBPDLG_FRAMESTAT_MAXIMIZED)
Many Many Thanks Roger,
this makes a lot different in flickering.
Thanks
Ankit
this makes a lot different in flickering.
Thanks
Ankit
Re: Autoresize with XBPDLG_FRAMESTAT_MAXIMIZED)
HI
DCGETOPTIONS ;
RESIZE RESIZEDEFAULT DCGUI_RESIZE_AUTORESIZE
Was really helpful but now when i use Gradient 1.5 on the button it creates all buttons slowly slowly, there are 42 buttons and one button to go to another screen where there are more buttons.
is there any way to use gradient effect?
Thanks
DCGETOPTIONS ;
RESIZE RESIZEDEFAULT DCGUI_RESIZE_AUTORESIZE
Was really helpful but now when i use Gradient 1.5 on the button it creates all buttons slowly slowly, there are 42 buttons and one button to go to another screen where there are more buttons.
is there any way to use gradient effect?
Thanks
Re: Autoresize with XBPDLG_FRAMESTAT_MAXIMIZED)
When I originally designed DCPUSHBUTTONXP (based on owner drawing), Xbase++ Gra*() functions did not support Gradients, therefore I had to create gradients using multiple calls to GraLine() or GraBox().
If you look at the source in _DCXBUTT.PRG (line 873), the DC_XbpPushbuttonXP() class supports a custom gradient code block.
I will write a sample program to show how to use this.
If you look at the source in _DCXBUTT.PRG (line 873), the DC_XbpPushbuttonXP() class supports a custom gradient code block.
I will write a sample program to show how to use this.
The eXpress train is coming - and it has more cars.
Re: Autoresize with XBPDLG_FRAMESTAT_MAXIMIZED)
Here is an example of using oConfig:gradientBlock that employs GraGradient() to paint the gradient.
If you resize the screen you will see how fast it will paint 200 buttons.
If you put a comment before oConfig:gradientBlock := {|oButton,oPS,mp2,nMode|PaintGradient(oButton,oPs,mp2,nMode)} then it
will use the default gradient system which paints gradients much slower.
Try experimenting with this to improve resize performance.
If you resize the screen you will see how fast it will paint 200 buttons.
If you put a comment before oConfig:gradientBlock := {|oButton,oPS,mp2,nMode|PaintGradient(oButton,oPs,mp2,nMode)} then it
will use the default gradient system which paints gradients much slower.
Try experimenting with this to improve resize performance.
Code: Select all
#INCLUDE "dcdialog.CH"
FUNCTION Main()
LOCAL GetList[0], GetOptions, oConfig, i, j, oButton, bGradientBlock
oConfig := DC_XbpPushButtonXPConfig():new()
oConfig:fgColor := GRA_CLR_WHITE
oConfig:bgColor := GRA_CLR_CYAN
oConfig:font := '10.Arial Bold'
oConfig:gradientStyle := 4
oConfig:gradientBlock := {|oButton,oPS,mp2,nMode|PaintGradient(oButton,oPs,mp2,nMode)}
FOR i := 1 to 20
FOR j := 1 TO 10
@ i*22, j*102 DCPUSHBUTTONXP CAPTION 'Button' SIZE 100,20 ;
CONFIG oConfig ;
GRADIENT 1 ;
ACTION {||Msgbox("activated")}
NEXT j
NEXT i
DCGETOPTIONS ;
PIXEL ;
RESIZE RESIZEDEFAULT DCGUI_RESIZE_AUTORESIZE
DCREAD GUI FIT TITLE 'Gradient Test' OPTIONS GetOptions
RETURN nil
* ----------
PROC appsys ; RETURN
* ----------
STATIC FUNCTION PaintGradient( oButton, oPS, mp2, nMode )
LOCAL aColor
IF BAND(mp2[3],XBP_DRAWSTATE_SELECTED) != 0
aColor := {GRA_CLR_RED, GRA_CLR_DARKRED}
ELSEIF oButton:mouseMode $ { 0,2 }
aColor := {GRA_CLR_CYAN,GRA_CLR_DARKCYAN}
ELSEIF oButton:mouseMode == 1
aColor := {GRA_CLR_DARKCYAN,GRA_CLR_CYAN}
ENDIF
GraGradient( oPS, {0,0}, {oButton:currentSize()}, aColor )
RETURN nil
The eXpress train is coming - and it has more cars.
Re: Autoresize with XBPDLG_FRAMESTAT_MAXIMIZED)
Thank you very much
you are a Genius!
This works super fast.
The only problem i am experiencing is, I can not pick up the button colour from the dbf file!
It only picks up the first button colour and applies to all?
Thanks
you are a Genius!
This works super fast.
The only problem i am experiencing is, I can not pick up the button colour from the dbf file!
It only picks up the first button colour and applies to all?
Thanks
Re: Autoresize with XBPDLG_FRAMESTAT_MAXIMIZED)
More about this..
If i use:
oConfig:bgColor := tkeys->bcolour
and remove the aColor from the GraGradient it looks like the attached image : (the second default colour is white)
Thanks
If i use:
oConfig:bgColor := tkeys->bcolour
and remove the aColor from the GraGradient it looks like the attached image : (the second default colour is white)
Thanks
- Attachments
-
- Capture.JPG (126.25 KiB) Viewed 15580 times