Disabling labels on TFolderex

Post Reply
User avatar
gkuhnert
Posts: 274
Joined: Fri Apr 04, 2008 1:25 pm
Location: Aachen - Germany // Kerkrade - Netherlands
Contact:

Disabling labels on TFolderex

Post by gkuhnert »

Hi,

as I mentioned before (http://forums.fivetechsupport.com/viewt ... =3&t=21248), it is not possible to disable labels on TFolderEx.
Now I've made a small sample so it's easier to reproduce (a click on the button should disable the label):

Code: Select all

#include "FIVEWIN.CH"

FUNCTION MAIN()

   local oDlg, oFld1, oSay, oBtn

   DEFINE DIALOG oDlg RESOURCE "DIALOG0"

   REDEFINE FOLDEREX oFld1 ID 110 OF oDlg;
        PROMPT "&Clipper", "&Windows" DIALOGS "Sub1", "Sub2"

    REDEFINE SAY oSay ID 1001 OF oFld1:aDialogs[1] UPDATE

    REDEFINE BUTTON oBtn ID 1002 OF oFld1:aDialogs[1];
        ACTION (oSay:Disable(), oFld1:aDialogs[1]:Refresh())

    ACTIVATE DIALOG oDlg CENTERED

return(0)
 
and the needed resource:

Code: Select all

DIALOG0 DIALOGEX 44,23,315,171
FONT 8,"MS Sans Serif"
LANGUAGE 7,1
STYLE WS_POPUP|WS_VISIBLE|WS_CAPTION|WS_SYSMENU|DS_MODALFRAME|DS_3DLOOK
BEGIN
  CONTROL "",110,"TFOLDEREX",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP,4,5,305,163
END

sub1 DIALOGEX 18,18,264,159
FONT 8,"MS Sans Serif"
LANGUAGE 7,1
STYLE WS_CHILDWINDOW|WS_VISIBLE|DS_3DLOOK
BEGIN
  CONTROL "Text",101,"Button",WS_CHILDWINDOW|WS_VISIBLE|WS_GROUP|WS_TABSTOP|BS_AUTORADIOBUTTON,37,30,28,12
  CONTROL "Label 1",1001,"Static",WS_CHILDWINDOW|WS_VISIBLE,36,69,54,9
  CONTROL "Click me",1002,"Button",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP,96,66,54,15
END

sub2 DIALOGEX 18,18,273,150
FONT 8,"MS Sans Serif"
LANGUAGE 7,1
STYLE WS_CHILDWINDOW|WS_VISIBLE|DS_3DLOOK
BEGIN
  CONTROL "Text",102,"Button",WS_CHILDWINDOW|WS_VISIBLE|WS_GROUP|WS_TABSTOP|BS_AUTORADIOBUTTON,37,30,28,12
  CONTROL "Label 2",1001,"Static",WS_CHILDWINDOW|WS_VISIBLE,39,60,54,9
END

 
Best Regards,

Gilbert Kuhnert
CTO Software GmbH
http://www.ctosoftware.de
User avatar
gkuhnert
Posts: 274
Joined: Fri Apr 04, 2008 1:25 pm
Location: Aachen - Germany // Kerkrade - Netherlands
Contact:

Re: Disabling labels on TFolderex

Post by gkuhnert »

Ok, now I've found out, that if you remove the "oFld:aDialogs[1]:Refresh()", the disable works at first, but as soon as the label has to be repainted (for example if you switch to the other tab and back or if you move another window over the label) it switches to enabled again.
Best Regards,

Gilbert Kuhnert
CTO Software GmbH
http://www.ctosoftware.de
Post Reply