topic stringlengths 1 63 | text stringlengths 1 577k ⌀ |
|---|---|
Checkbox and Radio are not transparent!? | Hello Günther,My test with Dialog-gradient-background : not transparent.[img:24niukrm]http://www.pflegeplus.com/pictures/gradient5.jpg[/img:24niukrm]RegardsUwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> |
Checkbox and Radio are not transparent!? | Uwe, thats not transparent!?And also the SAYS with clausula UPDATE are not transparent, when the text are updated! |
Checkbox and Radio are not transparent!? | Hello Günther,All tests in Dialog and Folder :Dialog and Folder with Gradient :Folder is OK.[img:1bb4i9ie]http://www.pflegeplus.com/pictures/gradient80.jpg[/img:1bb4i9ie]RegardsUwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> |
Checkbox and Radio are not transparent!? | Günther,>I am using not a bitmap as background! I use as background: ... gradientfill()>Then the transparent clause does not work We have previously commented this issue on these forums. It is a Windows limitation:<!-- m --><a class="postlink" href="http://forums.fivetechsoft.com/viewtopic.php?t=12117">http://forums.fivetechsoft.com/viewtopic.php?t=12117</a><!-- m --> |
Checkbox and Radio are not transparent!? | Hello,I did some tests with Dialog and Transparent :The 2. Dialog captured the gradient from Dialog 1.Checkbox and Radio are transparent.[img:3m716txt]http://www.pflegeplus.com/pictures/dlgtest1.jpg[/img:3m716txt]RegardsUwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> |
Checkbox and Radio are not transparent!? | Uwe, please show me the source! |
Checkbox and Radio are not transparent!? | Uwe,I guess you are using a NULL brush, so there is no background brush and the one from the main dialog is seen |
Checkbox and Radio are not transparent!? | Antonio, is it possible to create a bmp from the gradientfill() function? The gradient colors for the background are from user and i will paint the dialog with this colors. |
Checkbox and Radio are not transparent!? | Antonio,Another test. The Test-Dialog-gradient is complete different to the others.The Dialog uses the normal Gradient-function as background.sample 1[img:q0sw9dhv]http://www.pflegeplus.com/pictures/testtrans1.jpg[/img:q0sw9dhv]sample 2[img:q0sw9dhv]http://www.pflegeplus.com/pictures/testtrans2.jpg[/img:q0sw9dhv]Image - test[img:q0sw9dhv]http://www.pflegeplus.com/pictures/testtrans3.jpg[/img:q0sw9dhv][code:q0sw9dhv]
// ---------- PREVIEW -------------------------------------
FUNCTION NEW_SOURCE(oWnd1)
LOCAL oDlg5, oBtn50, oBtn51, oBtn52, oBtn53, oTITLE30
DEFINE DIALOG oDlg5 RESOURCE "Test" OF oWnd TITLE "Windows- / Dialog-Test and Source" FONT oProgFont
REDEFINE BUTTONBMP oBtn50 ID 50 OF oDlg5 ;
ACTION ( TEST_TRANS ( oDlg5 ) ) ;
BITMAP "Notes" PROMPT " Dialog-Test" TEXTRIGHT
oBtn50:cToolTip = { "Show" + CRLF + ;
"BMP-Transparent","BMP", 1, CLR_BLACK, 14089979 }
REDEFINE BUTTONBMP oBtn51 ID 40 OF oDlg5 ;
ACTION ( BITMAP_DAT ( oDlg5 ) ) ;
BITMAP "Notes" PROMPT " BMP-View" TEXTRIGHT
oBtn51:cToolTip = { "Show" + CRLF + ;
"Background-BMP","BMP", 1, CLR_BLACK, 14089979 }
REDEFINE BUTTONBMP oBtn52 ID 30 OF oDlg5 ;
ACTION ( SOURCE_DAT ( oDlg5 ) ) ;
BITMAP "Notes" PROMPT " Source" TEXTRIGHT
oBtn52:cToolTip = { "Show" + CRLF + ;
"Background-Source","Source", 1, CLR_BLACK, 14089979 }
REDEFINE BUTTONBMP oBtn53 ID 20 OF oDlg5 ;
ACTION ( oDlg5:End() ) ;
BITMAP "Quit" PROMPT " Exit" TEXTRIGHT
oBtn53:cToolTip = { "Close" + CRLF + ;
"the Dialog","Background-Test", 1, CLR_BLACK, 14089979 }
ACTIVATE DIALOG oDlg5 CENTERED ;
ON INIT NEW_COLOR3a(oDlg5) ;
ON PAINT( IIF( CLR_POS2 = 1, gradpaint2( hDC, oDlg5 ), NIL ), ;
IIF( BR_POS3 = 17, SHOW_PIC2( oDlg5 ), NIL ) )
oWnd1:End()
RETURN( NIL )
//------- BMP to Copy Gradient if needed ----------------------------//
FUNCTION BITMAP_DAT(oDlg5)
LOCAL oDlg6
DEFINE DIALOG oDlg6 RESOURCE "Bitmap" OF oDlg5 TITLE "BMP-Gradient" FONT oProgFont
ACTIVATE DIALOG oDlg6 CENTERED ;
ON PAINT gradpaint2( hDC, oDlg6 ) ;
RETURN( NIL )
// -----------------------------------
Function TEST_TRANS(oDlg5)
Local oDlg6, oBrush, oCbx, oRad, nVal := 1, lVal := .T.
DEFINE BRUSH oBrush FILE "Logo1.bmp"
DEFINE DIALOG oDlg6 RESOURCE "TestBMP" OF oDlg5 BRUSH oBrush TRANSPARENT ;
TITLE "Transparent-Dialog-Test ( Gradient or Brush )" FONT oProgFont
REDEFINE RADIO oRad VAR nVal ID 10 OF oDlg6
REDEFINE CHECKBOX oCbx VAR lVal ID 20 OF oDlg6
// selection
// -----------
// CLR_POS2 = 1 Gradient
// CLR_POS2 = 17 Brush
ACTIVATE DIALOG oDlg6 CENTERED ;
ON PAINT( IIF( CLR_POS2 = 1, gradpaint2( hDC, oDlg6 ), NIL ), ;
IIF( BR_POS3 = 17, SHOW_PIC2( oDlg6 ), NIL ) )
RETURN NIL
// -----------------------------------------------
static func gradpaint2( hDC, oDlg )
// Color-Vars
// ------------
local aGrad1 := { { nMOVE2, BR_COLOR3, BR_COLOR4 }, ;
{ nMOVE2, BR_COLOR4, BR_COLOR3 } }
// Style Hor. or Vert.
// ---------------------
IF BR_STYLE2 = 1
GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, aGrad1, .T. )
ELSE
GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, aGrad1, .F. )
ENDIF
RETURN NIL
// -----------------------------------
FUNCTION SHOW_PIC2( oDlg5 )
LOCAL oImage2
LOCAL aRect := GETCLIENTRECT( oDlg5:hWnd )
cNEWLOGO := ALLTRIM(cLOGO2)
IF BR_TYP2 = "B" // Brush-select
IF ! Empty( cNEWLOGO ) .and. File( "&cNEWLOGO" )
DEFINE BRUSH oImage2 FILE "&cNEWLOGO"
SET BRUSH OF oDlg5 TO oImage2
ELSE
MsgAlert("No file selected !","Attention" )
ENDIF
ENDIF
IF BR_TYP2 = "I" // Image-select
IF ! Empty( cNEWLOGO ) .and. File( "&cNEWLOGO" )
@ 0, 0 IMAGE oImage2 SIZE aRect[4], aRect[3] OF oDlg5 ADJUST
oImage2:LoadBmp( "&cNEWLOGO" )
ELSE
MsgAlert("No file selected !","Attention" )
ENDIF
ENDIF
RETURN( NIL )
[/code:q0sw9dhv]RegardsUwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> |
Checkbox and Radio are not transparent!? | Uwe,Please run your tests in XP and see what you getOr, are you using XP with a different theme ? |
Checkbox and Radio are not transparent!? | Günther,You can use oDlg:SaveToBmp( cBmpFileName ) |
Checkbox and Radio are not transparent!? | Antonio,the tests i'have done with VISTA.I tested with XP and Windows2000Result :XP : Radio and SAY is transparent. Checkbox not.Windows2000 : only SAY is transparent.Is there a solution for XP, maybe to get the checkbox working as well ?I still have a question about the text :For the new release of the tool, to create the background for windows and Dialog, i added some new functions.There is a preview for RADIO, CHECKBOX and SAY added.As well, there is a new small dialog, to create a gradient and then to cut and save the gradient as Bitmap to use as background ( with adjust ).I have to test, what happens, using a bitmap ( not the gradient-function ).Is it possible, to change the textcolor of RADIO, CHECKBOX and SAY at runtime ?[img:13i6yyg3]http://www.pflegeplus.com/pictures/trans10.jpg[/img:13i6yyg3]RegardsUwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> |
Checkbox and Radio are not transparent!? | Uwe,> Is there a solution for XP, maybe to get the checkbox working as well ? We have not found it <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> It is ok for Vista, but it is not ok for XP.>Is it possible, to change the textcolor of RADIO, CHECKBOX and SAY at runtime ? >oControl:SetColor( ... )oControl:Refresh() |
Checkbox and Radio are not transparent!? | Antonio,Say, radio and text works well in transparent-mode with XP.Only the Checkbox-transparent-text doesn't work.A easy solution ?In resources : I disconnect the text from the Checkbox ( no text ).Next I resize the checkbox to the box-size ( keeping only the square ).In the screenshot, I didn't resize exactly, to show what i mean.Next stepp : I Show the needed text next to the checkbox as extra text. In XP the checkbox with text is shown correct now.XP- SCREENSHOT[img:3bd35cgn]http://www.pflegeplus.com/pictures/grad15.jpg[/img:3bd35cgn]RegardsUwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> |
Checkbox and Radio are not transparent!? | HiThis is the result of a simple work around to paint RADIOS/CHECKBOXES/SAYS/GROUPS/IMAGES and other controlson gradient dialogs. This work around is tested in WIN98, WINXP NOT TESTED ON VISTA.[url=http://img389.imageshack.us/my.php?image=gradtestlr5.png:2ccyf6kv][img:2ccyf6kv]http://img389.imageshack.us/img389/6813/gradtestlr5.th.png[/img:2ccyf6kv][/url:2ccyf6kv]In case anybody needs any help in this regard, they are welcome.- Ramesh Babu P |
Checkbox and Radio are not transparent!? | Hello RAMESHBABU,can you show me the source for it, to see, what is differentto my solution ?I have all Windows-versions installed.I can test on 98, NT, 2000, XP and VISTA.RegardsUwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> |
Checkbox and Radio are not transparent!? | Hello RAMESHBABU!Please send me your source! I am very interesting! |
Checkbox and Radio are not transparent!? | Hello Mr.ukoenig and Mr.Günther Please check your inboxesRegards,- Ramesh Babu P |
Checkbox and Radio are not transparent!? | Hello Mr. RAMESHBABU,I tested it with VISTA.It works perfect.Thank you very much for your nice solution.regardsUwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> |
Checkbox and Radio are not transparent!? | Mr.ukoenigThank You and you are most welcome.Regards-Ramesh Babu P |
Checkbox and Radio are not transparent!? | Hi RAMESHBABU! Please send me your source! I am very interesting!Thanks, |
Checkbox and Radio are not transparent!? | Hello RAMESHBABU! Many thanks for your reply!I tested your solution on vista and 2000. On 2000 it is not functioning. On Vista is functioning but if the checkbox is clicked, the old and the new text is shown! |
Checkbox and Radio are not transparent!? | Hello Günther,I think, Microsoft changed a DLL belongs to the display, because ofall the different results.Some DLL's can transfered to other window-version without problem.Maybe i can find out searching in Internet, the name of the DLLchanged in VISTA.RegardsUwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> |
Checkbox and Radio are not transparent!? | Ramesh,Would you mind to share your solution here in the forums ? thanks <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->Otherwise I appreciate if you email it to me, thanks |
Checkbox and Radio are not transparent!? | Mr.Antonio/Mr.HorizonPlease check your inboxes.Regards- Ramesh Babu P |
Checkbox and Radio are not transparent!? | Dear Mr.Ramesh Babu,I would like to see your code. If you don't mind can you send it to my email id <!-- e --><a href="mailto:anserkk@gmail.com">anserkk@gmail.com</a><!-- e -->RegardsAnser |
Checkbox and Radio are not transparent!? | Hello Anser,Check your inbox.- Ramesh Babu P |
Checkbox and Radio are not transparent!? | Ramesh,Could you please resend it to me as a ZIP file renamed as ZOP ? thanks |
Checkbox and Radio are not transparent!? | Dear Ramesh,I have not rcvd u'r mail in my Gmail id as said. If u attached a zip file then gmail blocks the mail. Request u to either rename the zip extention or u may send it to my hotmail id <!-- e --><a href="mailto:anserkk@hotmail.com">anserkk@hotmail.com</a><!-- e -->RegardsAnser |
Checkbox and Radio are not transparent!? | Dear Ramesh,Thanks for your contribution, could you please send me the code to jmurugosa (at) gmail.com, I really need of your solution.Thanks in advance. |
Checkbox and Radio are not transparent!? | Hello Anser Bhai,Could be please provide an alternate e-mail. I got the mail bounced back.Regards- Ramesh babu P |
Checkbox and Radio are not transparent!? | Mr.Murugosa,Please check your inbox. - Ramesh babu P |
Checkbox and Radio are not transparent!? | [quote="RAMESHBABU":3a8bbh9d]Mr.Murugosa,
Please check your inbox.
- Ramesh babu P[/quote:3a8bbh9d]Thanks Ramesh, but I didn´t recieve the mail, If you are sending a zip file or rar file, please rename it as .zzz or .rrr so I can recieve it.Thanks again for your kind help |
Checkbox and Radio are not transparent!? | Dear Ramesh,I have not received it, probably due to the same reasons as Jose explains. |
Checkbox and Radio are not transparent!? | Mr.Antonio, Jose and AnserI am extremely sorry for the inconvenience. Here is the link to download.[url:1leni3ey]http://www.aksharasoft.com/gradtest.zip[/url:1leni3ey]- Ramesh Babu P |
Checkbox and Radio are not transparent!? | Thankyou Ramesh Bhai,RegardsAnser |
Checkbox and Radio are not transparent!? | Dear Ramesh,could you send me your solution, too.Thanks |
Checkbox and Radio are not transparent!? | Ramesh,I just found the download link <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> Thanks |
Checkbox and Radio are not transparent!? | Ramesh,Ok, so basically what you do is to create a bitmap from the painted gradient and then use the bitmap for a brush.We could implement a method to automatically do it, without having to use any external tool <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
Checkbox and Radio are not transparent!? | Hi Ramesh,Thank you for sending gradtest.zip.If I am not wrong, The function in prg uses the external EXE files. BMPtoJPG and NCONVERT.Can you also provide these files if it is possible?. I try find them from net. but i think different versions can not works like your function wanted. |
Checkbox and Radio are not transparent!? | Hello All!I found a solution for this problem. Not very elegant, but usable. This could functioning on all OS. Antonio, this should inserted in dialog-class! The real size of a redefined dialog is only to see, when activated.[code:2uqkvlbw]
DEFINE DIALOG oDlg........
.
dlg_brush(oDlg,CLR_BLUE,CLR_HBLUE)
.
ACTIVATE oDlg
//--------------------------------------------------------
function dlg_brush(oDlg,nColorTop,nColorBottom)
local oDlg_temp,oBr,nWidth,nHeight,cRes := "",cFile:= "back.bmp"
DEFAULT nColorTop := nRGB( 219, 230, 244 ) , nColorBottom := nRGB( 207, 221, 239 )
if !empty(oDlg)
cRes := oDlg:cResName
if !empty(cRes)
cFile:= cRes+"_back.bmp"
DEFINE DIALOG oDlg_temp RESOURCE cRes
ACTIVATE DIALOG oDlg_temp ;
ON INIT ;
(oDlg_temp:hide(),;
nHeight := oDlg_temp:nHeight(),;
nWidth := 1,; //oDlg_temp:nWidth(),;
oDlg_temp:end())
else
nHeight := oDlg:nBottom
nWidth := 1
endif
DEFINE DIALOG oDlg_temp FROM 0,0 TO nHeight,nWidth PIXEL STYLE nOr(WS_POPUP,4)
ACTIVATE DIALOG oDlg_temp ;
ON PAINT ;
(GradientFill( oDlg_temp:hDC, 0, 0, oDlg_temp:nHeight(), oDlg_temp:nWidth(), {{ 1,nColorTop,nColorBottom}} ),;
oDlg_temp:SaveToBmp(cFile),;
oDlg_temp:end())
if file( cFile )
DEFINE BRUSH oBr FILE cFile
oDlg:oBrush := oBr
ferase( cFile )
endif
endif
return NIL
//-------------------------------------------------------------[/code:2uqkvlbw] |
Checkbox and Radio are not transparent!? | Hi all,some time ago I enhanced the TBrush class, you can use like the original one. It creates brushes with a gradient on the fly.I hope, it´s helpful.Usage:[code:u20hcnje]...
oBrushX := TBrushX():New ( ... )
DEFINE DIALOG ... BRUSH oBrushX[/code:u20hcnje]
and the class:
[code:u20hcnje]// ============================================================================
// CLASS TBrushX Version May 2008
// Authors: Stefan Haupt
// Silvio Falconi
// you can freely use this class, please don´t remove these lines
//============================================================================
// Erweiterte TBrush-Class für Brushes mit Gradient
// (Enhanced brush class to create brushes with a gradient)
// Parameter
// nColorFrom : Startfarbe bzw. Array {Startfarbe, Endfarbe} für oberen Gradient
// startcolor or array with start- endcolor for upper gradient
// nColorTo : Endfarbe bzw. Array {Startfarbe, Endfarbe} für unteren Gradient
// endcolor or array with start- endcolor for lower gradient
// lVGrad : .t. für vertikal, .f. für horizontal
// .t. for vertical, .f. for horizontal
// l2007 : Office-Look mit 2 Gradienten
// Look2007 with 2 gradients
//-----------------------------------------------------------------------------
#include "Fivewin.ch"
CLASS TBrushX FROM TBrush
METHOD New( nColor, nColor2, lVGrad ) //CONSTRUCTOR
ENDCLASS
METHOD New( nWidth, nHeight, nColorFrom, nColorTo, lVGrad, l2007 ) CLASS TBrushX
::lSystem = .f.
::hBitmap := CreateExtBrush (nWidth, nHeight, nColorFrom, nColorTo, lVGrad, l2007 )
::hBrush = If( ::hBitmap != 0, CreatePatternBrush( ::hBitmap ), )
::nCount := 1
AAdd( ::aBrushes, Self )
return Self
//-----------------------------------------------------------------//
FUNCTION CreateExtBrush ( nWidth, nHeight, nColorFrom, nColorTo, lVGrad, l2007 )
LOCAL hDC := CreateDC( "DISPLAY",0,0,0 )
LOCAL hDCMem := CreateCompatibleDC( hDC )
LOCAL hBmp := CreateCompatibleBitmap( hDC, nWidth, nHeight )
LOCAL hOldBmp := SelectObject( hDCMem, hBmp )
LOCAL aRC0 := {0,0,nHeight/2,nWidth}
LOCAL aRC := {nHeight/2,0,nHeight,nWidth}
LOCAL nClrUpperFrom, nClrLowerFrom, nClrUpperTo, nClrLowerTo
DEFAULT lVGrad := .t. // vertikaler Gradient (vertical gradient)
DEFAULT nColorTo := nColorFrom //
DEFAULT l2007 := .t. // Office-Look mit 2 Gradienten (Look2007 with 2 gradients)
IF Valtype (nColorFrom) == "A"
nClrUpperFrom := nColorFrom[1]
nClrUpperTo := nColorFrom[2]
ELSE
nClrUpperFrom := nColorFrom
nClrUpperTo := nColorFrom
ENDIF
IF Valtype (nColorTo) == "A"
nClrLowerFrom := nColorTo[1]
nClrLowerTo := nColorTo[2]
ELSE
nClrLowerFrom := nColorTo
nClrLowerTo := nColorTo
ENDIF
IF l2007
lVGrad := .t.
Gradient( hDCMem, {aRC0[1],aRC0[2],aRC0[3]+2,aRC0[4]}, nClrUpperFrom, nClrUpperTo, lVGrad )
Gradient( hDCMem, {aRC[1],aRC[2],aRC[3]+2,aRC[4]}, nClrLowerFrom, nClrLowerTo, lVGrad )
ELSE
Gradient( hDCMem, {0,0,nHeight,nWidth}, nClrUpperFrom, nClrLowerTo, lVGrad )
ENDIF
SelectObject( hDCMem, hOldBmp )
DeleteDC( hDCMem )
DeleteDC( hDC )
RETURN (hBmp)
//-------------------------------------------------------------------//
DLL32 FUNCTION CREATECOMPATIBLEBITMAP( hDC AS LONG,;
nWidth AS LONG,;
nHeight AS LONG) AS LONG;
PASCAL FROM "CreateCompatibleBitmap" LIB "gdi32.dll"
[/code:u20hcnje] |
Checkbox and Radio are not transparent!? | Stephan,Can you us a small working example please?Thanks, |
Checkbox and Radio are not transparent!? | Dear Antonio,Thanks for your attention to the subject.>>Ok, so basically what you do is to create a bitmap from the painted >>gradient and then use the bitmap for a brush. Yes.>> could implement a method to automatically do it, without having to >>e any external tool The main reason to adopt this work around is non functioning of DIBWRITEin win98. Always I found that a bitmap of 0 bytes is created in win98.As I said, this is a workaround and if it is done in native FWH, it would be a great help to the total communitiy.Thanks,- Ramesh Babu P |
Checkbox and Radio are not transparent!? | Hakan,lets take Ramesh´s sample, here is the changed test[code:67ra38r4]#include "fivewin.ch"
#include "Image.ch"
FUNCTION main()
LOCAL oDlg, oIcon, oBrush, oGroup, oRadio, oCheckBox, oSay, oGet, oButton
LOCAL cTest := "Hello world! ", nValue := 2, lValue := .F., oImage
DEFINE ICON oIcon FILE "..\icons\fivewin.ico"
//DEFINE BRUSH oBrush
oBrush := TBrushX():New (100,160,CLR_WHITE,nRgb(152,194,152), .t.,.f.) // <------
// Take care that the dimension of the bitmap has the same size as the dialog
DEFINE DIALOG oDlg TITLE "I am a DialogBox" BRUSH oBrush ;
ICON oIcon TRANSPARENT
@ 4.25,.25 IMAGE oImage SIZE 20, 20 OF oDlg NOBORDER
oImage:LoadImage( "gradtest", )
@ 0.25,0.75 GROUP oGroup TO 4,21.80 PROMPT "Test Group" OF oDlg ;
COLOR CLR_BLUE TRANSPARENT
@ 0.75,2.00 SAY oSay PROMPT "Enter your Name:" OF oDlg SIZE 7,12 ;
COLOR CLR_BLUE
@ 0.90,7.50 GET cTest OF oDlg SIZE 40,12
@ 1.75,0.95 RADIO oRadio VAR nValue ;
ITEMS "&One", "&Two", "T&hree" _3D SIZE 50, 12 ;
OF oDlg ON CHANGE MsgBeep() COLOR CLR_RED
@ 3.35,10.00 CHECKBOX oCheckBox VAR lValue PROMPT "&ClickMe" SIZE 100, 12 ;
OF oDlg ;
ON CHANGE oCheckBox:SetText( "New Text" ) COLOR CLR_BLUE
@ 3.35,5.00 BUTTON "&Ok" SIZE 35, 12 ;
ACTION MsgInfo( "Any action here!" ) DEFAULT
@ 3.35,16.00 BUTTON "&Cancel" SIZE 35, 12 ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED ;
VALID MsgYesNo( "Do you want to end ?" )
RETURN nil[/code:67ra38r4] |
Checkbox and Radio are not transparent!? | Thanks Stefan,It works good. Is it possible to give oBrush's Width and Height in ACTIVATE DIALOG ON INIT like below?[code:2ibybbfm]
ACTIVATE DIALOG oDlg CENTERED ON INIT (oBrush:nHeight := oDlg:nHeight,oBrush:nWidth:=oDlg:nWidth) ;
VALID MsgYesNo( "Do you want to end ?" )
[/code:2ibybbfm] |
Checkbox and Radio are not transparent!? | Hakan,no, that´s not possible at the moment, because the bitmap is created only virtually.But you can try this (not tested):[code:3mmetvvg]DEFINE BRUSH oBrush
//oBrush := TBrushX():New (100,160,CLR_WHITE,nRgb(152,194,152), .t.,.f.) // <------
// Take care that the dimension of the bitmap has the same size as the dialog
DEFINE DIALOG oDlg TITLE "I am a DialogBox" BRUSH oBrush
ACTIVATE DIALOG oDlg CENTERED ON INIT (oBrush := TBrushX():New (oDlg:nWidth,oDlg:nHeight,CLR_WHITE,nRgb(152,194,152), .t.,.f.),;
oDlg:SetColor (,,oBrush), oDlg:Refresh() )[/code:3mmetvvg] |
Checkbox and Radio are not transparent!? | A working example:
[code:25u61aza]
#include "FiveWin.ch"
function Main()
local oDlg, oCbx1, lValue1 := .T., oCbx2, lValue2 := .T., oCbx3, lValue3 := .T.
local oRadMenu, nValue := 1
DEFINE DIALOG oDlg TITLE "Test"
@ 1, 2 CHECKBOX oCbx1 VAR lValue1 COLOR "W+/B"
oCbx1:lTransparent = .T.
@ 2, 2 CHECKBOX oCbx2 VAR lValue2 COLOR "W+/B"
oCbx2:lTransparent = .T.
@ 3, 2 CHECKBOX oCbx3 VAR lValue3 COLOR "W+/B"
oCbx3:lTransparent = .T.
@ 1.3, 9 RADIO oRadMenu VAR nValue ITEMS "One", "Two", "Three" SIZE 80, 13 COLOR "GR+/B"
AEval( oRadMenu:aItems, { | oRad | oRad:lTransparent := .T. } )
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT GradientBrush( oDlg, { { 0.4, nRGB( 75, 144, 223 ), nRGB( 41, 85, 145 ) },;
{ 0.6, nRGB( 24, 61, 118 ), nRGB( 50, 95, 158 ) } } )
return nil
function GradientBrush( oDlg, aColors )
local hDC, hBmp, hBmpOld
if Empty( oDlg:oBrush:hBitmap )
hDC = CreateCompatibleDC( oDlg:GetDC() )
hBmp = CreateCompatibleBitMap( oDlg:hDC, oDlg:nWidth, oDlg:nHeight )
hBmpOld = SelectObject( hDC, hBmp )
GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, aColors )
oDlg:oBrush:hBitmap = hBmp
oDlg:oBrush:hBrush = CreatePatternBrush( hBmp )
SelectObject( hDC, hBmpOld )
oDlg:ReleaseDC()
endif
return nil
[/code:25u61aza]
[url=http://imageshack.us:25u61aza][img:25u61aza]http://img25.imageshack.us/img25/1808/capturetu0.png[/img:25u61aza][/url:25u61aza] |
Checkbox and Radio are not transparent!? | Hello Mr.Antinio,
Thanks for your nice solution. But I dont find source for "[color=#0000FF:2921iihr]CreateCompatableBitMap()[/color:2921iihr]".
I am using FWH 8.09
Please provide it to me.
Regards,
- Ramesh Babu P |
Checkbox and Radio are not transparent!? | Dear Mr.Ramesh and Mr.Antonio
The Sample is working fine in FWH 9.01
Regards
Anser |
Checkbox and Radio are not transparent!? | Mr.Antonio,
I got the source for [color=#0000FF:yj0rc2rv]"CreateCompatableBitMap()"[/color:yj0rc2rv] function in the earlier pages of this posting
itself.
I have tested your solution in FWH8.09 and worked very well.
Finally our GURU Mr.Antonio has given a very best solution for Gradient Dialogs.
Thank you once again.
- Ramesh Babu P |
Checkbox and Radio are not transparent!? | Dear Ramesh,
I am happy that finally we found a simple solution for it <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
As you see the function GradientBrush() dynamically creates a brush but using the dimensions of the dialogbox, so we can use aColors the same way as we use it with GradientFill() <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
Checkbox and Radio are not transparent!? | Dear Mr.Antinio
>>As you see the function GradientBrush() dynamically creates a brush but using the dimensions of the dialogbox, so we can
>>use aColors the same way as we use it with GradientFill()
Yes. The function is simple and intelligent.
Just now I have completed replacing my earlier functions with GradientBrush() in my projects and testing ...
Regards,
- Ramesh Babu P |
Checkbox and Radio are not transparent!? | Günther,
Yes, its a curious effect <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> caused because we are changing a default brush.
This is the way to solve it: just define a brush for the dialog where GradientBrush() is used:
[code:3563h4ub]
#include "FiveWin.ch"
function Main()
local oWnd
DEFINE WINDOW oWnd
@ 1.6, 17 BUTTON "First" SIZE 70, 25 ACTION First()
@ 3.6, 17 BUTTON "Another" SIZE 70, 25 ACTION Another()
ACTIVATE WINDOW oWnd
return nil
function First()
local oDlg, oBrush
local oCbx1, lValue1 := .T., oCbx2, lValue2 := .T., oCbx3, lValue3 := .T.
local oRadMenu, nValue := 1
DEFINE BRUSH oBrush COLOR CLR_WHITE
DEFINE DIALOG oDlg TITLE "Test" BRUSH oBrush
@ 1, 2 CHECKBOX oCbx1 VAR lValue1 COLOR "W+/B"
oCbx1:lTransparent = .T.
@ 2, 2 CHECKBOX oCbx2 VAR lValue2 COLOR "W+/B"
oCbx2:lTransparent = .T.
@ 3, 2 CHECKBOX oCbx3 VAR lValue3 COLOR "W+/B"
oCbx3:lTransparent = .T.
@ 1.3, 9 RADIO oRadMenu VAR nValue ITEMS "One", "Two", "Three" SIZE 30, 13 COLOR "GR+/B"
AEval( oRadMenu:aItems, { | oRad | oRad:lTransparent := .T. } )
@ 1.6, 17 BUTTON "Another" ACTION Another()
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT GradientBrush( oDlg, { { 0.4, nRGB( 75, 144, 223 ), nRGB( 41, 85, 145 ) },;
{ 0.6, nRGB( 24, 61, 118 ), nRGB( 50, 95, 158 ) } } )
return nil
function Another()
local oDlg
DEFINE DIALOG oDlg
ACTIVATE DIALOG oDlg CENTERED
return nil
function GradientBrush( oDlg, aColors )
local hDC, hBmp, hBmpOld, oBrush
if Empty( oDlg:oBrush:hBitmap )
hDC = CreateCompatibleDC( oDlg:GetDC() )
hBmp = CreateCompatibleBitMap( oDlg:hDC, oDlg:nWidth, oDlg:nHeight )
hBmpOld = SelectObject( hDC, hBmp )
GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, aColors )
DeleteObject( oDlg:oBrush:hBrush )
oDlg:oBrush:hBitmap = hBmp
oDlg:oBrush:hBrush = CreatePatternBrush( hBmp )
SelectObject( hDC, hBmpOld )
oDlg:ReleaseDC()
endif
return nil
[/code:3563h4ub] |
Checkbox and Radio are not transparent!? | This is functioning but if i use not only one dialog in program, this brush are used also in all other dialogs. But the brush is not defined in this dialogs with ..ON INIT. |
Checkbox and Radio are not transparent!? | Antonio, can this solution not included into the function gradientbrush() with oDlg:setbrush(obrush) or so? In TBrush you are save all brushes for a new call from the same brush. Should be this brush made from gradientbrush() erased? And should the resources hDC and hBmp not be released? |
Checkbox and Radio are not transparent!? | Günther,
Yes, I missed to destroy the hDC! <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? -->
hBmp will be destroyed by the brush itself.
The problem to include it as a Method in Class TBrush is that we need the dimensions of the dialog in advance...
[code:1ykdkcjv]
function GradientBrush( oDlg, aColors )
local hDC, hBmp, hBmpOld, oBrush
if Empty( oDlg:oBrush:hBitmap )
hDC = CreateCompatibleDC( oDlg:GetDC() )
hBmp = CreateCompatibleBitMap( oDlg:hDC, oDlg:nWidth, oDlg:nHeight )
hBmpOld = SelectObject( hDC, hBmp )
GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, aColors )
DeleteObject( oDlg:oBrush:hBrush )
oDlg:oBrush:hBitmap = hBmp
oDlg:oBrush:hBrush = CreatePatternBrush( hBmp )
SelectObject( hDC, hBmpOld )
DeleteDC( hDC )
oDlg:ReleaseDC()
endif
return nil
[/code:1ykdkcjv] |
Checkbox and Radio are not transparent!? | Antonio, now also the gets use this brush! And in the print-preview the metafiles are also colored with this brush. |
Checkbox control | Antonio,
I found probably this same effect as in button action control . Checkbox status is still this same. Sample code:
[code:6b2tpbsz]
#Include 'FwCe.Ch'
Function TestCheck ()
Local oWnd := Nil
Local lVal := .F.
Define Window oWnd Title 'Test Check'
@ 100, 20 CheckBox lVal Prompt 'Test checkbox' Size 120, 20 Pixel Of oWnd On Change MsgInfo ('Checkbox changed')
Activate Window oWnd
Return .T.
[/code:6b2tpbsz]
Regards
Pawel |
Checkbox control | Pawel,
Yes, it was the same bug and also the same in TRadio. Fixed.
A new FWPPC build is already available to download.
many thanks for your feedback, |
Checkbox disappearing (MinGW) | In the following sample, the checkbox disappears when it receives the focus. Please note that the problem shows up only with Harbour and MinGW.
Any ideas?
[code=fw:6aijzd2n]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oDlg<br /><br /> <span style="color: #00C800;">LOCAL</span> cVar := SPACE<span style="color: #000000;">(</span> <span style="color: #000000;">30</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> lVar := .F.<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">GET</span> cVar<br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">CHECKBOX</span> lVar<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br /> <span style="color: #0000ff;">CENTER</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:6aijzd2n]
EMG |
Checkbox disappearing (MinGW) | Thank you. Are you using MinGW? Did you move the focus to checkbox?
There is nobody here using MinGW, please?
EMG |
Checkbox disappearing (MinGW) | It also happens when you add the OF oDlg clause? |
Checkbox disappearing (MinGW) | Yes, same result. This is the files used to build the EXE:
[code=fw:h2jxsb2o]<div class="fw" id="{CB}" style="font-family: monospace;">q.prg<br />-fullstatic <br />fwh.hbc<br /><br />This is fwh.hbc:<br /><br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>incpaths=include<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libpaths=lib<br /><br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>gt=gtgui<br /><br /><span style="color: #000000;">{</span>mingw<span style="color: #000000;">}</span>libs=fivehg fivehgc<br /><span style="color: #000000;">{</span>bcc<span style="color: #000000;">}</span>libs=fiveh fivehc<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=comctl32<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=comdlg32<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=gdi32<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=hbct<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=hbsqlit3<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=hbtip<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=hbwin<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=hbmainstd<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=hbziparc<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=hbmzip<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=minizip<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=hbnf<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=hbodbc<br /><span style="color: #000000;">{</span>mingw<span style="color: #000000;">}</span>libs=kernel32<br /><span style="color: #000000;">{</span>mingw<span style="color: #000000;">}</span>libs=mfcuia32<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=msimg32<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=odbc32<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=ole32<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=oleaut32<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=oledlg<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=psapi<br /><span style="color: #000000;">{</span>mingw<span style="color: #000000;">}</span>libs=stdc++<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=user32<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=uuid<br /><span style="color: #000000;">{</span>mingw<span style="color: #000000;">}</span>libs=version<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=vfw32<br /><span style="color: #000000;">{</span>mingw<span style="color: #000000;">}</span>libs=win32k<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=winmm<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=winspool<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=wsock32<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=xhb<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=gdiplus<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=shell32<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=mpr<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=png</div>[/code:h2jxsb2o]
EMG |
Checkbox disappearing (MinGW) | Enrico, run OK in my tests
[img:2d1st7yi]https://i.postimg.cc/hjd0vGg7/enri16.png[/img:2d1st7yi] |
Checkbox disappearing (MinGW) | Enrico, yes, this sample is build with MinGW 8.10 |
Checkbox disappearing (MinGW) | Ok, thank you.
EMG |
Checkbox disappearing (MinGW) | I only use the libraries that are marked.
[img:30dbreod]https://i.postimg.cc/CLdrfhKK/enri17.png[/img:30dbreod] |
Checkbox disappearing (MinGW) | The problem was the MinGW version used (probably a bug in that version of MinGW SDK libs). Using a new version (10.2) the problem is fixed.
EMG |
Checkbox does not show Tooltip when disabled. | Hi,
Is it possible to show tooltip when the checkbox is disabled? |
Checkbox does not show Tooltip when disabled. | Hakan,
Place an "empty" SAY below the checkbox and use the SAY tooltip |
Checkbox does not show Tooltip when disabled. | [quote:1thnkqx7]Place an "empty" SAY below the checkbox and use the SAY tooltip[/quote:1thnkqx7]
another solution to keep the mouse-cursor inside
the checkboxarea :
[img:1thnkqx7]http://www.service-fivewin.de/IMAGES/disable1.jpg[/img:1thnkqx7]
[code=fw:1thnkqx7]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">static</span> oWnd<br /><br /><span style="color: #B900B9;">//--------------------------- </span><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> oBtn<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span>, oChk, lValue := .T.<br /><br />SetBalloon<span style="color: #000000;">(</span> .T. <span style="color: #000000;">)</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Testing tooltips "</span> + FWVERSION <span style="color: #0000ff;">from</span> <span style="color: #000000;">1</span>,<span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">300</span>, <span style="color: #000000;">300</span> <span style="color: #0000ff;">pixel</span><br /><br />@ <span style="color: #000000;">50</span>, <span style="color: #000000;">50</span> <span style="color: #0000ff;">BTNBMP</span> oBtn<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">OF</span> oWnd ;<br /><span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span> NOBORDER TRANSPARENT<br />oBtn<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cToolTip</span> := <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Testing tooltips on"</span> + CRLF + <span style="color: #ff0000;">"DISABLED"</span>, <span style="color: #ff0000;">"ATTENTION"</span>, <span style="color: #000000;">1</span>, CLR_BLACK, <span style="color: #000000;">14089979</span> <span style="color: #000000;">}</span><br />@ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">CHECKBOX</span> oChk <span style="color: #0000ff;">VAR</span> lValue <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Disabled"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">OF</span> oBtn<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">PIXEL</span> ;<br /><span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> oChk:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Enabled"</span> <span style="color: #000000;">)</span><br />oChk:<span style="color: #000000;">cToolTip</span> := <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Testing tooltips on"</span> + CRLF + <span style="color: #ff0000;">"ENABLED"</span>, <span style="color: #ff0000;">"ATTENTION"</span>, <span style="color: #000000;">1</span>, CLR_BLACK, <span style="color: #000000;">14089979</span> <span style="color: #000000;">}</span><br />oChk:<span style="color: #000000;">disable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />oChk:<span style="color: #000000;">SetColor</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"W+/R"</span><span style="color: #000000;">)</span><br /><br />@ <span style="color: #000000;">100</span>, <span style="color: #000000;">50</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Enable"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>, <span style="color: #000000;">25</span> <span style="color: #0000ff;">PIXEL</span> ;<br /><span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oChk:<span style="color: #000000;">Enable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oChk:<span style="color: #000000;">SetColor</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"W+/B"</span><span style="color: #000000;">)</span>, oChk:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Enabled"</span> <span style="color: #000000;">)</span>, oChk:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br />@ <span style="color: #000000;">150</span>, <span style="color: #000000;">50</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Disable"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>, <span style="color: #000000;">25</span> <span style="color: #0000ff;">PIXEL</span> ;<br /><span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oChk:<span style="color: #000000;">Disable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oChk:<span style="color: #000000;">SetColor</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"W+/R"</span><span style="color: #000000;">)</span>, oChk:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Disablrd"</span> <span style="color: #000000;">)</span>, oChk:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:1thnkqx7]
best regards
Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
Checkbox does not show Tooltip when disabled. | Very good.
[code=fw:34w3zsha]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// \SAMPLES\CHKDISAB.PRG</span><br /><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">STATIC</span> oWnd<br /><br /><span style="color: #B900B9;">// ---------------------------</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oBtn<span style="color: #000000;">[</span> <span style="color: #000000;">3</span> <span style="color: #000000;">]</span>, oChk, lValue := .T.<br /><br /> SetBalloon<span style="color: #000000;">(</span> .T. <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Testing tooltips "</span> + FWVERSION ;<br /> <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">300</span>, <span style="color: #000000;">300</span> <span style="color: #0000ff;">PIXEL</span><br /><br /> @ <span style="color: #000000;">50</span>, <span style="color: #000000;">50</span> <span style="color: #0000ff;">BTNBMP</span> oBtn<span style="color: #000000;">[</span> <span style="color: #000000;">3</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">OF</span> oWnd ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span> NOBORDER TRANSPARENT<br /><br /> oBtn<span style="color: #000000;">[</span> <span style="color: #000000;">3</span> <span style="color: #000000;">]</span>:<span style="color: #000000;">cToolTip</span> := <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Testing tooltips on"</span> + CRLF + <span style="color: #ff0000;">"DISABLED"</span>, <span style="color: #ff0000;">"ATTENTION"</span>, <span style="color: #000000;">1</span>, CLR_BLACK, <span style="color: #000000;">14089979</span> <span style="color: #000000;">}</span><br /><br /> @ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">CHECKBOX</span> oChk <span style="color: #0000ff;">VAR</span> lValue <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Disabled"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">OF</span> oBtn<span style="color: #000000;">[</span> <span style="color: #000000;">3</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">PIXEL</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> oChk:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Enabled"</span> <span style="color: #000000;">)</span><br /><br /> oChk:<span style="color: #000000;">cToolTip</span> := <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Testing tooltips on"</span> + CRLF + <span style="color: #ff0000;">"ENABLED"</span>, <span style="color: #ff0000;">"ATTENTION"</span>, <span style="color: #000000;">1</span>, CLR_BLACK, <span style="color: #000000;">14089979</span> <span style="color: #000000;">}</span><br /><br /> oChk:<span style="color: #000000;">disable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oChk:<span style="color: #000000;">SetColor</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"W+/R"</span> <span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">100</span>, <span style="color: #000000;">50</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Enable"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>, <span style="color: #000000;">25</span> <span style="color: #0000ff;">PIXEL</span> ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oChk:<span style="color: #000000;">Enable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oChk:<span style="color: #000000;">SetColor</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"W+/B"</span> <span style="color: #000000;">)</span>, oChk:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Enabled"</span> <span style="color: #000000;">)</span>, oChk:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">/* // Original:<br /> @ 150, 50 BUTTON "&Disable" SIZE 120, 25 PIXEL ;<br /> ACTION ( oChk:Disable(), oChk:SetColor( "W+/R" ), oChk:SetText( "Disabled" ), oChk:Refresh() )<br /> */</span><br /><br /> <span style="color: #B900B9;">// Modified:</span><br /> @ <span style="color: #000000;">150</span>, <span style="color: #000000;">50</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Disable"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>, <span style="color: #000000;">25</span> <span style="color: #0000ff;">PIXEL</span> ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oChk:<span style="color: #000000;">Disable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oChk:<span style="color: #000000;">SetColor</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"W+/R"</span> <span style="color: #000000;">)</span>, ;<br /> oChk:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Disabled"</span> <span style="color: #000000;">)</span>, CHANGE_COLOR_CHECBOX<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> CHANGE_COLOR_CHECBOX<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oSay AS OBJECT<br /><br /> @ <span style="color: #000000;">50</span>, <span style="color: #000000;">63</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Disabled "</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">088</span>, <span style="color: #000000;">20</span> ;<br /> COLORS CLR_BLACK, CLR_YELLOW <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">CENTER</span> BORDER <span style="color: #0000ff;">ADJUST</span><br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">(</span> .T. <span style="color: #000000;">)</span><br /> </div>[/code:34w3zsha]
Regards, saludos. |
Checkbox does not show Tooltip when disabled. | [quote="Antonio Linares":3elz4r1u]Hakan,
Place an "empty" SAY below the checkbox and use the SAY tooltip[/quote:3elz4r1u]
Thank you Antonio,
But it seems the cTooltip does not executed in TSay object. |
Checkbox does not show Tooltip when disabled. | [quote="ukoenig":2221taaz][quote:2221taaz]Place an "empty" SAY below the checkbox and use the SAY tooltip[/quote:2221taaz]
another solution to keep the mouse-cursor inside
the checkboxarea :
[img:2221taaz]http://www.service-fivewin.de/IMAGES/disable1.jpg[/img:2221taaz]
[code=fw:2221taaz]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">static</span> oWnd<br /><br /><span style="color: #B900B9;">//--------------------------- </span><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> oBtn<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span>, oChk, lValue := .T.<br /><br />SetBalloon<span style="color: #000000;">(</span> .T. <span style="color: #000000;">)</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Testing tooltips "</span> + FWVERSION <span style="color: #0000ff;">from</span> <span style="color: #000000;">1</span>,<span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">300</span>, <span style="color: #000000;">300</span> <span style="color: #0000ff;">pixel</span><br /><br />@ <span style="color: #000000;">50</span>, <span style="color: #000000;">50</span> <span style="color: #0000ff;">BTNBMP</span> oBtn<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">OF</span> oWnd ;<br /><span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span> NOBORDER TRANSPARENT<br />oBtn<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cToolTip</span> := <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Testing tooltips on"</span> + CRLF + <span style="color: #ff0000;">"DISABLED"</span>, <span style="color: #ff0000;">"ATTENTION"</span>, <span style="color: #000000;">1</span>, CLR_BLACK, <span style="color: #000000;">14089979</span> <span style="color: #000000;">}</span><br />@ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">CHECKBOX</span> oChk <span style="color: #0000ff;">VAR</span> lValue <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Disabled"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">OF</span> oBtn<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">PIXEL</span> ;<br /><span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> oChk:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Enabled"</span> <span style="color: #000000;">)</span><br />oChk:<span style="color: #000000;">cToolTip</span> := <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Testing tooltips on"</span> + CRLF + <span style="color: #ff0000;">"ENABLED"</span>, <span style="color: #ff0000;">"ATTENTION"</span>, <span style="color: #000000;">1</span>, CLR_BLACK, <span style="color: #000000;">14089979</span> <span style="color: #000000;">}</span><br />oChk:<span style="color: #000000;">disable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />oChk:<span style="color: #000000;">SetColor</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"W+/R"</span><span style="color: #000000;">)</span><br /><br />@ <span style="color: #000000;">100</span>, <span style="color: #000000;">50</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Enable"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>, <span style="color: #000000;">25</span> <span style="color: #0000ff;">PIXEL</span> ;<br /><span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oChk:<span style="color: #000000;">Enable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oChk:<span style="color: #000000;">SetColor</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"W+/B"</span><span style="color: #000000;">)</span>, oChk:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Enabled"</span> <span style="color: #000000;">)</span>, oChk:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br />@ <span style="color: #000000;">150</span>, <span style="color: #000000;">50</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Disable"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>, <span style="color: #000000;">25</span> <span style="color: #0000ff;">PIXEL</span> ;<br /><span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oChk:<span style="color: #000000;">Disable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oChk:<span style="color: #000000;">SetColor</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"W+/R"</span><span style="color: #000000;">)</span>, oChk:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Disablrd"</span> <span style="color: #000000;">)</span>, oChk:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:2221taaz]
best regards
Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->[/quote:2221taaz]
Thank you Uwe. I use dialog and I could not use checkbox in TBtnBmp object in dialog. |
Checkbox does not show Tooltip when disabled. | Hakan,
I have modified FWH\samples\testsay.prg this way and see the result as I explained you, using a SAY under the checkbox:
[img:2wszehv1]https://github.com/FiveTechSoft/screenshots/blob/master/checkbox_disabled_tooltip.JPG?raw=true[/img:2wszehv1]
[code=fw:2wszehv1]<div class="fw" id="{CB}" style="font-family: monospace;">procedure Dlg_Grad<br /><br /><span style="color: #00C800;">local</span> oDlg, oSay, oBrush, lTest := .T., oCbx<br /><br /> <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">brush</span> oBrush gradient <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">0.4</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">75</span>, <span style="color: #000000;">144</span>, <span style="color: #000000;">223</span> <span style="color: #000000;">)</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">41</span>, <span style="color: #000000;">85</span>, <span style="color: #000000;">145</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span>,;<br /> <span style="color: #000000;">{</span> <span style="color: #000000;">0.6</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">24</span>, <span style="color: #000000;">61</span>, <span style="color: #000000;">118</span> <span style="color: #000000;">)</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">95</span>, <span style="color: #000000;">158</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /> <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">dialog</span> odlg <span style="color: #0000ff;">title</span> <span style="color: #ff0000;">"Test Say With Gradient Brush"</span> ;<br /> <span style="color: #0000ff;">size</span> <span style="color: #000000;">400</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">brush</span> oBrush transparent<br /><br /> @ <span style="color: #000000;">2</span>,<span style="color: #000000;">2</span> GROUP <span style="color: #0000ff;">TO</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">100</span> <span style="color: #0000ff;">of</span> odlg <span style="color: #0000ff;">pixel</span><br /><br /> @ <span style="color: #000000;">25</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">say</span> oSay <span style="color: #0000ff;">prompt</span> <span style="color: #ff0000;">"This a Test"</span> <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">40</span> <span style="color: #0000ff;">COLOR</span> CLR_WHITE <span style="color: #0000ff;">PIXEL</span> transparent <span style="color: #0000ff;">adjust</span><br /> @ <span style="color: #000000;">25.5</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">CHECKBOX</span> oCbx <span style="color: #0000ff;">VAR</span> lTest <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Checkbox"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">30</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span><br /><br /> @ <span style="color: #000000;">10</span>,<span style="color: #000000;">120</span> <span style="color: #0000ff;">button</span> <span style="color: #ff0000;">"Test"</span> <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">action</span> oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Change Text"</span> <span style="color: #000000;">)</span><br /><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">(</span> EnableWindow<span style="color: #000000;">(</span> oCbx:<span style="color: #000000;">hWnd</span>, .F. <span style="color: #000000;">)</span>, oSay:<span style="color: #000000;">lWantClick</span> := .T., oSay:<span style="color: #000000;">cTooltip</span> := <span style="color: #ff0000;">"this is a test"</span>, oSay:<span style="color: #000000;">ShowToolTip</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, .T. <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">release</span> <span style="color: #0000ff;">brush</span> oBrush<br /><br /><span style="color: #00C800;">return</span></div>[/code:2wszehv1] |
Checkbox e Radio | Em uma dialog com varios checkbox e radio, abre normal, mas ao pressionar ALT,
eles simplesmente ficam hide().
Depois disto se passar com o mouse sobre a area que eles deveriam estar, eles
ficam Show(). |
Checkbox e Radio | Sérgio,
Que versión de FWH usas ?
Ese error se corrigió hace ya bastante tiempo <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
Checkbox e Radio | FWH 9.04
PellesC
Bcc551
Windows 7 Home Premium |
Checkbox e Radio | Ola Personal, já tive um problema aqui parecido,aonde eu preenchia meus box com cor, dai o que estava la dentro sumia, minha solução foi colocar na propriedade do Groupbox Visible=No.
Luiz Fernando |
Checkbox en Browser | Hola foro,
Alguien tiene un ejemplo de como colocar un checkbox como parte de un registro en un browser ?
Gracias de antemano |
Checkbox en Browser | Usa:
oBrowse:SetChecks()
Las columnas a mostrar el checkbox tienen que mostrar valores lógicos
Admite un primer parámetro con los dos nombres de imágenes alternativas desde recursos
y un segúndo parámetro lógico para indicar si se permite cambiar el valor (editarlo)
Este segundo parámetro puede ser un codeblock |
Checkbox en Browser | [code=fw:37v5aed3]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #B900B9;">// el campo "ACCE" en logico </span><br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oLbx <span style="color: #0000ff;">ID</span> <span style="color: #000000;">20</span> COLUMNS <span style="color: #ff0000;">"NIVE"</span>,<span style="color: #ff0000;">"RAIZ"</span>,<span style="color: #ff0000;">"DESC"</span>,<span style="color: #ff0000;">"ACCE"</span> <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"PA04"</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">OF</span> oDlg NOBORDER AUTOSORT FOOTERS<br /><br /> oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cHeader</span> := <span style="color: #ff0000;">"Nivel"</span> ; oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">30</span> ; oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nDataStrAlign</span> := AL_CENTER<br /> oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cHeader</span> := <span style="color: #ff0000;">"Modulo"</span> ; oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">80</span> ; oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nDataStrAlign</span> := AL_CENTER<br /> oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cHeader</span> := <span style="color: #ff0000;">"Procedimiento"</span> ; oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">440</span><br /> oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">4</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cHeader</span> := <span style="color: #ff0000;">"Acceso"</span> ; oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">4</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">50</span><br /><br /> oLbx:<span style="color: #000000;">Acceso</span>:<span style="color: #000000;">SetCheck</span><span style="color: #000000;">(</span> <span style="color: #000000;">{</span> FWBmpOn<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, FWBmpOff<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span>, EDIT_GET <span style="color: #000000;">)</span><br /><br /> </div>[/code:37v5aed3]
[img:37v5aed3]http://i65.tinypic.com/15hg1oh.jpg[/img:37v5aed3]
saludos
saludos |
Checkbox en Browser | Disculpa Antonio,
No me quedo muy claro con el ejemplo que me indicastes. |
Checkbox en Browser | Si el browse está mostrando algún valor lógico solo tienes que hacer oBrowse:SetChecks() y esas columnas aparecerán como checkboxes |
Checkbox en Browser | [quote="armando.lagunas":2sahbon3][code=fw:2sahbon3]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #B900B9;">// el campo "ACCE" en logico </span><br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oLbx <span style="color: #0000ff;">ID</span> <span style="color: #000000;">20</span> COLUMNS <span style="color: #ff0000;">"NIVE"</span>,<span style="color: #ff0000;">"RAIZ"</span>,<span style="color: #ff0000;">"DESC"</span>,<span style="color: #ff0000;">"ACCE"</span> <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"PA04"</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">OF</span> oDlg NOBORDER AUTOSORT FOOTERS<br /><br /> oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cHeader</span> := <span style="color: #ff0000;">"Nivel"</span> ; oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">30</span> ; oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nDataStrAlign</span> := AL_CENTER<br /> oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cHeader</span> := <span style="color: #ff0000;">"Modulo"</span> ; oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">80</span> ; oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nDataStrAlign</span> := AL_CENTER<br /> oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cHeader</span> := <span style="color: #ff0000;">"Procedimiento"</span> ; oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">440</span><br /> oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">4</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cHeader</span> := <span style="color: #ff0000;">"Acceso"</span> ; oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">4</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">50</span><br /><br /> oLbx:<span style="color: #000000;">Acceso</span>:<span style="color: #000000;">SetCheck</span><span style="color: #000000;">(</span> <span style="color: #000000;">{</span> FWBmpOn<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, FWBmpOff<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span>, EDIT_GET <span style="color: #000000;">)</span><br /><br /> </div>[/code:2sahbon3]
[img:2sahbon3]http://i65.tinypic.com/15hg1oh.jpg[/img:2sahbon3]
saludos
saludos[/quote:2sahbon3]
Armando, que tipo de diseño es el menu que usas.? se ve bastante llamativo, muy buena combinacion de colores...por lo menos para mis gustos...gracias, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> |
Checkbox en Browser | hola, jose:
no es un menu, es una opcion que trae la clase ribbonbar, es BackStage y la utilizo asi:
[code=fw:19nouda0]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #0000ff;">DEFINE</span> RIBBONBAR oBar <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Recepción"</span>,<span style="color: #ff0000;">"Producción"</span>,<span style="color: #ff0000;">"Despachos"</span>,<span style="color: #ff0000;">"Materiales"</span>,<span style="color: #ff0000;">"Liquidación"</span>,<span style="color: #ff0000;">"Herramientas"</span> HEIGHT <span style="color: #000000;">95</span><br /><br /> @ <span style="color: #000000;">4</span>, <span style="color: #000000;">5</span> RBBTN oBtn <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">64</span>, <span style="color: #000000;">19</span> BITMAP <span style="color: #ff0000;">".<span style="color: #000000;">\S</span>YSTEM<span style="color: #000000;">\h</span>elp.bmp"</span> <span style="color: #0000ff;">ACTION</span> oBar:<span style="color: #000000;">BackStage</span> <span style="color: #0000ff;">OF</span> oBar <span style="color: #0000ff;">CENTER</span> ;<br /> <span style="color: #0000ff;">NORMAL</span> GRADIANT <span style="color: #000000;">{</span><span style="color: #000000;">{</span><span style="color: #000000;">1</span>,nRGB<span style="color: #000000;">(</span><span style="color: #000000;">205</span>, <span style="color: #000000;">28</span>, <span style="color: #000000;">28</span><span style="color: #000000;">)</span>,nRGB<span style="color: #000000;">(</span><span style="color: #000000;">140</span>, <span style="color: #000000;">28</span>, <span style="color: #000000;">28</span><span style="color: #000000;">)</span><span style="color: #000000;">}</span><span style="color: #000000;">}</span> ;<br /> TOOLTIP <span style="color: #ff0000;">"Sub sistema de configuración inicial"</span><br /><br /> oBar:<span style="color: #000000;">nGroupSeparation</span> := <span style="color: #000000;">5</span><br /> oBar:<span style="color: #000000;">nLeftMargin</span> := <span style="color: #000000;">75</span><br /> oBar:<span style="color: #000000;">CalcPos</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oBar:<span style="color: #000000;">nSeparation</span><span style="color: #000000;">(</span> <span style="color: #000000;">5</span> <span style="color: #000000;">)</span><br /> BackStage<span style="color: #000000;">(</span> oBar, oBtn <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">FUNCTION</span> BackStage<span style="color: #000000;">(</span> oBar, oBtn <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> oBack<br /><br /> <span style="color: #0000ff;">DEFINE</span> BACKSTAGE oBack MAINWIDTH <span style="color: #000000;">297</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> BSSELECT <span style="color: #0000ff;">OF</span> oBack <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Parametros Principales"</span> HEIGHT <span style="color: #000000;">70</span> COLORTEXT <span style="color: #00C800;">NIL</span>, CLR_YELLOW<br /><br /> <span style="color: #0000ff;">DEFINE</span> BSBUTTON <span style="color: #0000ff;">OF</span> oBack <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">" Impresora Principal"</span> BITMAP <span style="color: #ff0000;">".<span style="color: #000000;">\S</span>KIN<span style="color: #000000;">\P</span>RIN.BMP"</span> HEIGHT <span style="color: #000000;">60</span> <span style="color: #0000ff;">ACTION</span> PrinterSetup<span style="color: #000000;">(</span><span style="color: #000000;">)</span> ;<br /> COLORTEXT nRGB<span style="color: #000000;">(</span><span style="color: #000000;">12</span>,<span style="color: #000000;">12</span>,<span style="color: #000000;">12</span><span style="color: #000000;">)</span> GRADIENT <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">1</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span> <span style="color: #000000;">)</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">198</span>, <span style="color: #000000;">198</span>,<span style="color: #000000;">198</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /> <span style="color: #0000ff;">DEFINE</span> BSBUTTON <span style="color: #0000ff;">OF</span> oBack <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">" Procedimientos Internos"</span> BITMAP <span style="color: #ff0000;">".<span style="color: #000000;">\S</span>KIN<span style="color: #000000;">\P</span>ASS.BMP"</span> HEIGHT <span style="color: #000000;">60</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Procedimientos"</span> <span style="color: #000000;">)</span> ;<br /> COLORTEXT nRGB<span style="color: #000000;">(</span><span style="color: #000000;">12</span>,<span style="color: #000000;">12</span>,<span style="color: #000000;">12</span><span style="color: #000000;">)</span> GRADIENT <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">1</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span> <span style="color: #000000;">)</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">198</span>, <span style="color: #000000;">198</span>,<span style="color: #000000;">198</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /> <span style="color: #0000ff;">DEFINE</span> BSBUTTON <span style="color: #0000ff;">OF</span> oBack <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">" Mantención de Usuarios"</span> BITMAP <span style="color: #ff0000;">".<span style="color: #000000;">\S</span>KIN<span style="color: #000000;">\U</span>SER.BMP"</span> HEIGHT <span style="color: #000000;">60</span> <span style="color: #0000ff;">ACTION</span> MantencionUsuarios<span style="color: #000000;">(</span> oBtn <span style="color: #000000;">)</span> ;<br /> COLORTEXT nRGB<span style="color: #000000;">(</span><span style="color: #000000;">12</span>,<span style="color: #000000;">12</span>,<span style="color: #000000;">12</span><span style="color: #000000;">)</span> GRADIENT <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">1</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span> <span style="color: #000000;">)</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">198</span>, <span style="color: #000000;">198</span>,<span style="color: #000000;">198</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> BSSELECT <span style="color: #0000ff;">OF</span> oBack <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Licencias de Uso"</span> HEIGHT <span style="color: #000000;">70</span> COLORTEXT <span style="color: #00C800;">NIL</span>, CLR_YELLOW<br /> <span style="color: #0000ff;">DEFINE</span> BSBUTTON <span style="color: #0000ff;">OF</span> oBack <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">" Licencia de Software"</span> BITMAP <span style="color: #ff0000;">".<span style="color: #000000;">\S</span>KIN<span style="color: #000000;">\D</span>ISP.BMP"</span> HEIGHT <span style="color: #000000;">60</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"LICENCIAS"</span> <span style="color: #000000;">)</span> ;<br /> COLORTEXT nRGB<span style="color: #000000;">(</span><span style="color: #000000;">12</span>,<span style="color: #000000;">12</span>,<span style="color: #000000;">12</span><span style="color: #000000;">)</span> GRADIENT <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">1</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span> <span style="color: #000000;">)</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">198</span>, <span style="color: #000000;">198</span>,<span style="color: #000000;">198</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> BSSELECT <span style="color: #0000ff;">OF</span> oBack <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Soporte de Sistemas"</span> HEIGHT <span style="color: #000000;">70</span> COLORTEXT <span style="color: #00C800;">NIL</span>, CLR_YELLOW<br /><br /> <span style="color: #0000ff;">DEFINE</span> BSBUTTON <span style="color: #0000ff;">OF</span> oBack <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">" Soporte en Linea"</span> BITMAP <span style="color: #ff0000;">".<span style="color: #000000;">\S</span>KIN<span style="color: #000000;">\M</span>AIL.BMP"</span> HEIGHT <span style="color: #000000;">60</span> <span style="color: #0000ff;">ACTION</span> MailMaster<span style="color: #000000;">(</span><span style="color: #ff0000;">"Main"</span><span style="color: #000000;">)</span> ;<br /> COLORTEXT nRGB<span style="color: #000000;">(</span><span style="color: #000000;">12</span>,<span style="color: #000000;">12</span>,<span style="color: #000000;">12</span><span style="color: #000000;">)</span> GRADIENT <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">1</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span> <span style="color: #000000;">)</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">198</span>, <span style="color: #000000;">198</span>,<span style="color: #000000;">198</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /> <span style="color: #0000ff;">DEFINE</span> BSBUTTON <span style="color: #0000ff;">OF</span> oBack <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">" Información y Ayuda"</span> BITMAP <span style="color: #ff0000;">".<span style="color: #000000;">\S</span>KIN<span style="color: #000000;">\H</span>ELP.BMP"</span> HEIGHT <span style="color: #000000;">60</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"AYUDA"</span> <span style="color: #000000;">)</span> ;<br /> COLORTEXT nRGB<span style="color: #000000;">(</span><span style="color: #000000;">12</span>,<span style="color: #000000;">12</span>,<span style="color: #000000;">12</span><span style="color: #000000;">)</span> GRADIENT <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">1</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span> <span style="color: #000000;">)</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">198</span>, <span style="color: #000000;">198</span>,<span style="color: #000000;">198</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /> <span style="color: #0000ff;">DEFINE</span> BSBUTTON <span style="color: #0000ff;">OF</span> oBack <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">" Retornar a Windows"</span> BITMAP <span style="color: #ff0000;">".<span style="color: #000000;">\S</span>KIN<span style="color: #000000;">\E</span>XIT.BMP"</span> HEIGHT <span style="color: #000000;">60</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">(</span> oBar:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> ;<br /> COLORTEXT nRGB<span style="color: #000000;">(</span><span style="color: #000000;">12</span>,<span style="color: #000000;">12</span>,<span style="color: #000000;">12</span><span style="color: #000000;">)</span> GRADIENT <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">1</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span> <span style="color: #000000;">)</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">198</span>, <span style="color: #000000;">198</span>,<span style="color: #000000;">198</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /> SET BACKSTAGE oBack <span style="color: #0000ff;">TO</span> oBar<br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /> </div>[/code:19nouda0] |
Checkbox en Browser | Armando, gracias por tu respuesta, no habia pillado que era la misma ribbon, ya lo habia utilizado pero creo que lo mas llamativo es el windows donde la usas, creo eso hace la gran diferencia, cuando la probe fue bajo WIN XP, igual probare tu ejemplo bajo WIN 7 haber como se ve, hasta los momentos es el windows que uso, gracias, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> |
Checkbox enable/disable | Hello,
Can we Enable and Disable a Checkbox. And can we programmaticaly change the checked state of a checkbox. What I want is the following:
I have 2 Checkboxes, Check_1 and Check_2. if I uncheck Check_1 I want Check_2 to be unchecked also and set disabled. i tried using ON CHANGE, but could not disable a checkbox.[code=fw:14qact5y]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> @ <span style="color: #000000;">150</span>, <span style="color: #000000;">180</span> <span style="color: #0000ff;">CHECKBOX</span> Check_1 <span style="color: #0000ff;">VAR</span> lCheck_1 <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'checkbox 1'</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">20</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #00C800;">IF</span><span style="color: #000000;">(</span>!lCheck_1, oChkPrintAfmeting:<span style="color: #000000;">Checked</span><span style="color: #000000;">(</span>.F.<span style="color: #000000;">)</span>, <span style="color: #000000;">)</span><br /> @ <span style="color: #000000;">120</span>, <span style="color: #000000;">180</span> <span style="color: #0000ff;">CHECKBOX</span> Check_2 <span style="color: #0000ff;">VAR</span> lCheck_2 <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'checkbox 2'</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">20</span><br /><br /> </div>[/code:14qact5y] |
Checkbox in header | Hi,
I have a array xbrowse, the first field is a logical than i can mark or unmark, how i can put a checkbox in header and how i control the status (mark or unmark).
Thanks in advance. |
Checkbox in header | Search in forum
One sample:
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=35501&p=211653&hilit=check+header#p211386">viewtopic.php?f=3&t=35501&p=211653&hilit=check+header#p211386</a><!-- l -->
[code=fw:1o1lodyv]<div class="fw" id="{CB}" style="font-family: monospace;"><br />:<span style="color: #000000;">nHeadBmpNo</span> := <span style="color: #000000;">{</span> || <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> Len<span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">aSelected</span> <span style="color: #000000;">)</span> == oBrw:<span style="color: #000000;">nLen</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> </div>[/code:1o1lodyv] |
Checkbox problem when disabled. | Hi,
My example is below. The problem is that when I press disable button, the area that is below the checkbox is disappeared.
In this case, when I move the mouse in this area, the lost fields are coming back again.
[code=fw:3m15zczt]<div class="fw" id="{CB}" style="font-family: monospace;">include <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oDlg, oChk, oChk2<br /><br /> <span style="color: #00C800;">LOCAL</span> lChk := .F., lChk2 := .F.<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /> oDlg:<span style="color: #000000;">lTransparent</span> := .T.<br /><br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">CHECKBOX</span> oChk <span style="color: #0000ff;">VAR</span> lChk <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Test"</span>;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">13</span> <br /><br /> @ <span style="color: #000000;">2</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">CHECKBOX</span> oChk2 <span style="color: #0000ff;">VAR</span> lChk2 <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Test2"</span>;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">13</span> <br /><br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Disable"</span>;<br /> <span style="color: #0000ff;">ACTION</span> oChk:<span style="color: #000000;">Disable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Enable"</span>;<br /> <span style="color: #0000ff;">ACTION</span> oChk:<span style="color: #000000;">Enable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br /> <span style="color: #0000ff;">CENTER</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:3m15zczt]
[code=fw:3m15zczt]<div class="fw" id="{CB}" style="font-family: monospace;">#ifndef __64__<br /> <span style="color: #000000;">1</span> <span style="color: #000000;">24</span> <span style="color: #ff0000;">"winxp<span style="color: #000000;">\W</span>indowsXP.Manifest"</span> <br />#endif<br /> </div>[/code:3m15zczt]
I think this is related Transparent issue. When I delete oDlg:lTransparent := .T., There is not any problem.
How Can I solve this problem?
Thanks. |
Checkbox problem when disabled. | At moment
[code=fw:2nm8jds8]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Disable"</span>;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oChk:<span style="color: #000000;">Disable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oDlg:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Enable"</span>;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oChk:<span style="color: #000000;">Enable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oDlg:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /> </div>[/code:2nm8jds8] |
Checkbox problem when disabled. | [quote="cnavarro":3idhx17j]At moment
[code=fw:3idhx17j]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Disable"</span>;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oChk:<span style="color: #000000;">Disable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oDlg:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Enable"</span>;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oChk:<span style="color: #000000;">Enable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oDlg:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /> </div>[/code:3idhx17j][/quote:3idhx17j]
Thank you Mr. Navarro. it works. |
Checkbox still strange | I still have a problem with checkboxes. On some dialogs, but not all, a checkbox requires a double click to change the value. On others, it takes a single click.
The problem is consistent on a dialog, but does not apply on all dialogs. A dialog with the problem may have two or three checkboxes, and they all require a double click. However, on another dialog they may work fine with a single click.
The controls are defined in an RC file and they are identical ( except for the coordinates ).
The REDEFINE CHECKBOX is the same in all cases.
This problem occurs in Versions 10.7 through 10.10, but not in 10.6.
No, I cannot build a simple sample that reproduces the problem, but when it occurs, it happens on all computers regardless of the OS.
I'd appreciate any ideas on what I might check for this problem. The application is themed, and I'm testing on Win 7 using FWH 10.10 and xBuilder ( xHarbour ) latest stable version.
Thanks for any ideas on where I might look.
Tim |
Checkbox still strange | Her is some further information on this problem.
If I link in the source from Control.prg dated 06/2010, the problems go away. So I did a comparison and found that there are three differences:
lTransparent is INIT as .f. and my application does use transparent dialogs
The control now uses a function IsKindOf( ) for folders and checkboxes. Where is this from and could it be giving a bad read ?
In HandleEvent( ) lTransparent is referenced and must be true for the checkbox to respond to the left mouse click. Again, I'm wondering if there is a problem with the lTransparent value sometimes ?
In summary, the problem is the result of changes in the control class ( not the checkbox class ) that occured in July 2010. Those changes seem to be exclusively with focus and transparency.
Any thoughts / suggestions ? |
Checkbox still strange | Tim,
Could you please post here the portion of your code where you use the checkbox ?
Does it have a VALID ? or a WHEN ? Does it have an ON CHANGE clause ?
thanks |
Checkbox still strange | Here is an example:
REDEFINE CHECKBOX oInvr:invcof ID 750 OF oDiw MESSAGE "Does this part have cores attached ?" UPDATE
REDEFINE CHECKBOX oInvr:invtxf ID 749 OF oDiw MESSAGE "Is this part generally taxable ?" UPDATE
REDEFINE CHECKBOX oInvr:invtyp ID 748 OF oDiw MESSAGE "Is this a stocking part ?" UPDATE
And the .rc controls:
CONTROL "Core", 750, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 80, 220, 40, 13
CONTROL "Tax", 749, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 26, 205, 40, 13
CONTROL "Stock", 748, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 26, 220, 40, 13
With 10.06, they work fine. With 10.07-10.10, they require a double click ! |
Checkbox still strange | Hi.
My problem with checkboxes is a bit different and not as critical.
The first time you click it, the whole dialog flickers. Further clicks on the check box won't cause the flickering. But it is only doing it on one particular dialog. I tried to build a reduced self-contained sample with the exact same code and resource but can't reproduced the behavior.
Reinaldo. |
Checkbox still strange | Reinaldo,
According to the What's New for ver 10.10 this has been fixed.
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=16&t=20166#p106713">viewtopic.php?f=16&t=20166#p106713</a><!-- l -->
Regards,
James |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.