Results 1 to 3 of 3

Thread: Idea for a new addin to copy / paste control attributes

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2011
    Posts
    500

    Idea for a new addin to copy / paste control attributes

    I tried some time ago to write a VB6 addin that would allow me to copy some or all attributes to a control at design time.
    Say i have a control that i have set fonts, colour , col count row count etc,
    I wanted to a way to read in all attributes of say a control and store them under that control name, ie (picturebox, textbox,msflexgrid)
    I then have this control set as i need.
    Then say i have a control or array of controls that i want to change attributes with one click ( obviously not the control name)
    I can then select all controls (ie all picturebox's) and from my pop up addin change all attributes that i select.

    does anyone already know of some code that does this. otherwise i will try again from scratch.

    tks

  2. #2
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,067

    Re: Idea for a new addin to copy / paste control attributes

    Yes, it can be done.

    Where are you planning to store the controls attributes, in INI file(s), in the registry?
    (Keep in mind that some developers don't like to store many things in the registry, anyway I don't know if you are planning to share it).

    I would suggest to be able to store more than just one property settings (attributes) for each control type, under a given name. For example "colored texbox", "flat texbox".

    Where are you stuck?

    You can try to grasp some code from this Add-in.

  3. #3
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,749

    Re: Idea for a new addin to copy / paste control attributes

    you need make a new usercontrol,if you change a textbox 4 items value:
    Text1.Text
    Text1.BorderStyle
    Text1.BackColor
    text1.ScrollBars

    you can save for text_set1 in ini

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width