How to disable the Fill-in?

Reynold

Member
Hi,

On a smart window, I placed one Fill-in. Now my requirement is to grey-out the fill-in (or we can say to disable the fill-in but it's box should be visible) by the use of coding (not by setting it's property).

I.e. suppose when we add a fill-in on smart-window - by default properties should be "Display" "Enable" "No-Undo". So when those properties are checked we want to achieve the look of run-time fill-in same as which we got when we uncheck "Enable" and check "Native".

Summary: I want to disable the fill-in but it's box should appear on run-time (just to grey out the fill-in so that user won't enter anything).

Thanks in advance.
 

Reynold

Member
I tried:
myFillin:read-only = true. >>> But we don't want that as it will allow the cursor to that fill-in (using tab or mouse).
myFillin:sensitive = false. >>> But we dont want that as it will disappear the whole fill-in box.
myFillin:hidden = true. >>> but we dont want that as we dont want to hide the whole fill-in.

We need to grey-out the fill-in(to protect from user entry) as well as no cursor reachability.

NOTE: THE SAME I CAN ACHIEVE BY DOING FILL-IN PROPERTY >> UNCHECK "ENABLE" AND CHECK "NATIVE". BUT WE WANT TO ACHIEVE ALL THIS BY CODING WHEN IN PROPERTY OF FILL-IN "DISPLAY" "ENABLE" "NO-UNDO" ARE CHECKED.
 

SergioC

Member
Hi, maybe this example will serve.

create local version of procedure InitializeObject.

Code:
/*------------------------------------------------------------------------------
  Purpose:     Super Override
  Parameters:  
  Notes:       
------------------------------------------------------------------------------*/


  /* Code placed here will execute PRIOR to standard behavior. */


  RUN SUPER.


  /* Code placed here will execute AFTER standard behavior.    */
  DO WITH FRAME {&FRAME-NAME}:
      FILL-IN-1:SENSITIVE = FALSE.
  END.


END PROCEDURE.
 

Reynold

Member
@SergioC : As I mentioned in my earlier doubt, that I don't want Sensitive as it won't show the fill-in box.
Any other suggestion will be helpful.
 

Cringer

ProgressTalk.com Moderator
Staff member
You need to set the NATIVE property of the fill in - then when it's disabled you will still see the outline.
 

Reynold

Member
Yes right I am aware of it that through Native I can achieve that (as i mentioned in my earlier replies). But, that is what my doubt is which i explained above.
By default properties of fill-in are set as "DISPLAY" "ENABLE" "NO-UNDO" checked. and I can't change those properties. I need to achieve the disable fill-in with outline through coding in local-initialize.

Could you help in this please.
 

SergioC

Member
Hi, if you are using ADM1, then try it, in the MAIN-BLOCK:

Code:
/* ***************************  Main Block  *************************** */


/* Include custom  Main Block code for SmartWindows. */
{src/adm/template/windowmn.i}


DO  WITH FRAME {&FRAME-NAME}:
    FILL-IN-1:SENSITIVE = FALSE.
END.

Mark FILL-IN-1 enable, display and native = true in property sheet.
Regards.
 

SergioC

Member
Excuse me, in procedure LOCAL-INTIALIZE.

Code:
/*------------------------------------------------------------------------------
  Purpose:     Override standard ADM method
  Notes:       
------------------------------------------------------------------------------*/


  /* Code placed here will execute PRIOR to standard behavior. */


  /* Dispatch standard ADM method.                             */
  RUN dispatch IN THIS-PROCEDURE ( INPUT 'initialize':U ) .


  /* Code placed here will execute AFTER standard behavior.    */


  DO  WITH FRAME {&FRAME-NAME}:
        FILL-IN-1:SENSITIVE = FALSE.
  END.


END PROCEDURE.

Regards.
 

Reynold

Member
Thanks ... but I mentioned in my earlier mail too, that I can't change the properties of the fill-in, so I can't make it native = true in property sheet.

Yes right I am aware of it that through Native I can achieve that (as i mentioned in my earlier replies). But, that is what my doubt is which i explained above.
By default properties of fill-in are set as "DISPLAY" "ENABLE" "NO-UNDO" checked. and I can't change those properties. I need to achieve the disable fill-in with outline through coding in local-initialize.
NOTE: THE SAME I CAN ACHIEVE BY DOING FILL-IN PROPERTY >> UNCHECK "ENABLE" AND CHECK "NATIVE". BUT WE WANT TO ACHIEVE ALL THIS BY CODING WHEN IN PROPERTY OF FILL-IN "DISPLAY" "ENABLE" "NO-UNDO" ARE CHECKED.

All are mentioned in my earlier mails ... and whatever i tried that too i mentioned in my earlier mail ... Could you let me know is it possible or it's not possible.
I am using OE version 10.2B.
 

trx

Member
Change "subtype" attribute to "native" before widget realization.
Code:
FILL-IN-1:SUBTYPE = "NATIVE".
 

SergioC

Member
I'm using version 9.1D07 to have look and feel of XP (it shows a box around the FILL-IN) had to apply the following, solution P46584:
Create a file called prowin32.exe.manifest in the %DLC%/bin directory with the following content.

Code:
<? xml version = "1.0" encoding = "UTF-8" standalone = "yes"?>
<assembly xmlns = "urn: schemas-microsoft-com: asm.v1"
manifestVersion = "1.0">
     Common Windows Forms Control <description> manifest </ description>
     <dependency>
         <dependentAssembly>
             <assemblyIdentity type = "win32"
                     name = "Microsoft.Windows.Common-Controls"
                     version = "6.0.0.0"
                     processorArchitecture = "X86"
                     publicKeyToken = "6595b64144ccf1df"
                     language = "*" />
         </ dependentAssembly>
     </ dependency>
</ assembly>

2) Add the following to the 'Startup' section of the registry or INI file:
UseClipChildren=yes


maybe will serve.
Regards.
 

Cringer

ProgressTalk.com Moderator
Staff member
In which case the only option I can think of is to "walk the widget tree" and check if the properties you want are set and then set the native property too.
 
Top