# Command for "double-clicking" a column divider?

**URL:** https://resource.dopus.com/t/command-for-double-clicking-a-column-divider/50774
**Category:** Help & Support
**Tags:** commands
**Created:** [May 12, 2024, 9:30pm UTC](https://resource.dopus.com/t/command-for-double-clicking-a-column-divider/50774 "2024-05-12T21:30:46Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![MartO](https://resource.dopus.com/user_avatar/resource.dopus.com/marto/32/54727_2.png) [@MartO](https://resource.dopus.com/u/MartO)
#### Post date: [May 12, 2024, 9:30pm UTC](https://resource.dopus.com/t/command-for-double-clicking-a-column-divider/50774/1 "2024-05-12T21:30:46Z")

</div>

What is the command equivalent to a double click on a column divider, ie. a one-shot resizing of a column without regard for any configured max width?

I tried workarounds like `Set COLUMNSADD=name(0,a,999)`, but that changes the column's config, which I'd like to avoid...

Thanks!

---

<div class="post-metadata">

### Author: ![Leo](https://resource.dopus.com/user_avatar/resource.dopus.com/leo/32/69732_2.png) [@Leo](https://resource.dopus.com/u/Leo)
#### Post date: [May 13, 2024, 9:33pm UTC](https://resource.dopus.com/t/command-for-double-clicking-a-column-divider/50774/2 "2024-05-13T21:33:24Z")

</div>

I don't think there is a command for that.

You could resize it using the command you found, and then undo that later via this:

```plaintext
Set FORMAT=!folder`

```

Slightly improved version of the command from your post (doesn't move the Name column, and completely removes the max limit instead of setting it to a large value):

```plaintext
Set COLUMNSADD=name(!,a,0)

```

---

<div class="post-metadata">

### Author: ![MartO](https://resource.dopus.com/user_avatar/resource.dopus.com/marto/32/54727_2.png) [@MartO](https://resource.dopus.com/u/MartO)
#### Post date: [May 14, 2024, 11:20am UTC](https://resource.dopus.com/t/command-for-double-clicking-a-column-divider/50774/3 "2024-05-14T11:20:42Z")

</div>

Very good, Leo, thanks for both commands!

---

<div class="post-metadata">

### Author: ![travibe](https://resource.dopus.com/user_avatar/resource.dopus.com/travibe/32/32530_2.png) [@travibe](https://resource.dopus.com/u/travibe)
#### Post date: [May 14, 2024, 4:14pm UTC](https://resource.dopus.com/t/command-for-double-clicking-a-column-divider/50774/4 "2024-05-14T16:14:22Z")

</div>

would the command be equivalent to changing the width of whichever column to autosize? Am I understanding the author correctly as to what he is referring to by double clicking the separator between column headers? Is it possible to create a command that would produce an effect like this to a specific column or whichever column is being focused on? This seems incredibly useful to me now that I am thinking about it.

---

<div class="post-metadata">

### Author: ![MartO](https://resource.dopus.com/user_avatar/resource.dopus.com/marto/32/54727_2.png) [@MartO](https://resource.dopus.com/u/MartO)
#### Post date: [May 14, 2024, 4:55pm UTC](https://resource.dopus.com/t/command-for-double-clicking-a-column-divider/50774/5 "2024-05-14T16:55:38Z")

</div>

You could add it to the column header context menu (Customize -\> Context Menus -\> Column Header)

`Set COLUMNSADD=%header%(!,a,0)`

I don't know if there's a way to find out the column from a (right) click inside the actual file display. Never tried that...

---

<div class="post-metadata">

### Author: ![Jon](https://resource.dopus.com/user_avatar/resource.dopus.com/jon/32/12713_2.png) [@Jon](https://resource.dopus.com/u/Jon)
#### Post date: [May 16, 2024, 5:30am UTC](https://resource.dopus.com/t/command-for-double-clicking-a-column-divider/50774/6 "2024-05-16T05:30:10Z")

</div>

In the next update we'll enhance the `Set AUTOSIZECOLUMNS` command to allow it to work on specific columns.

---

<div class="post-metadata">

### Author: ![jinsight](https://resource.dopus.com/user_avatar/resource.dopus.com/jinsight/32/43666_2.png) [@jinsight](https://resource.dopus.com/u/jinsight)
#### Post date: [May 18, 2024, 2:24am UTC](https://resource.dopus.com/t/command-for-double-clicking-a-column-divider/50774/7 "2024-05-18T02:24:56Z")

</div>

Here's a top level button that toggles between a name column that is wide and standard width.

[Wide-Standard Width Name Column Toggle.dcf](https://resource.dopus.com/uploads/short-url/jEzeWqVLonKxyV8eFvYNjGU3HG0.dcf) (553 Bytes)

Here's a column header context menu button that toggles between the current column that is wide and standard width.

[Wide-Standard Width Current Column Toggle.dcf](https://resource.dopus.com/uploads/short-url/2vkOzXSb57czYkSFveu7Wzdxqnr.dcf) (560 Bytes)

---

<div class="post-metadata">

### Author: ![MartO](https://resource.dopus.com/user_avatar/resource.dopus.com/marto/32/54727_2.png) [@MartO](https://resource.dopus.com/u/MartO)
#### Post date: [May 18, 2024, 9:16am UTC](https://resource.dopus.com/t/command-for-double-clicking-a-column-divider/50774/8 "2024-05-18T09:16:46Z")

</div>

Thank you for the example, jinsight.

I'd suggest a slight improvement if you want to use a variable for tracking the state: A global variable isn't the best approach - better use a "src" variable. Otherwise, switching to dual mode or opening another lister will lead to errors.

For me, the update Jon has announced will be the solution.

---

<div class="post-metadata">

### Author: ![MartO](https://resource.dopus.com/user_avatar/resource.dopus.com/marto/32/54727_2.png) [@MartO](https://resource.dopus.com/u/MartO)
#### Post date: [May 20, 2024, 10:36am UTC](https://resource.dopus.com/t/command-for-double-clicking-a-column-divider/50774/9 "2024-05-20T10:36:16Z")

</div>

Yes, the [change in 13.6.2](https://resource.dopus.com/t/directory-opus-13-6-2-beta/50865) works as described, but sadly it isn't the answer to my original question. The command `Set AUTOSIZECOLUMNS=col:name` does resize the column, but it still doesn't override the configured max value - it's not the equivalent to a double click on the column divider.

I'll stick with Leo's improved workaround for now. 😃

---

<div class="post-metadata">

### Author: ![travibe](https://resource.dopus.com/user_avatar/resource.dopus.com/travibe/32/32530_2.png) [@travibe](https://resource.dopus.com/u/travibe)
#### Post date: [May 21, 2024, 8:50pm UTC](https://resource.dopus.com/t/command-for-double-clicking-a-column-divider/50774/10 "2024-05-21T20:50:46Z")

</div>

Jon you get a cookie for being a boss at your job. I really appreciate all you do here!

---

<div class="post-metadata">

### Author: ![travibe](https://resource.dopus.com/user_avatar/resource.dopus.com/travibe/32/32530_2.png) [@travibe](https://resource.dopus.com/u/travibe)
#### Post date: [May 21, 2024, 8:55pm UTC](https://resource.dopus.com/t/command-for-double-clicking-a-column-divider/50774/11 "2024-05-21T20:55:38Z")

</div>

Of these commands you've posted, can any of them be set to a button where I can toggle autosize on/off  
i.e. go autosize, and then toggle back to what it was set before?

---

<div class="post-metadata">

### Author: ![Leo](https://resource.dopus.com/user_avatar/resource.dopus.com/leo/32/69732_2.png) [@Leo](https://resource.dopus.com/u/Leo)
#### Post date: [May 21, 2024, 9:16pm UTC](https://resource.dopus.com/t/command-for-double-clicking-a-column-divider/50774/12 "2024-05-21T21:16:49Z")

</div>

> [@MartO](#):
>
> but it still doesn't override the configured max value

We'll add a way to do that in the next beta.

> [@travibe](#):
>
> can any of them be set to a button where I can toggle autosize on/off

Yes, but it requires scripting. There's an example script here which does something similar:

> [@Tutorial video: Column resizing & folder formats](https://resource.dopus.com/t/tutorial-video-column-resizing-folder-formats/23208/6):
>
> Here it is (updated with tbone's improvements; see below): [Auto-Size All.dcf](https://resource.dopus.com/uploads/default/original/3X/1/4/14b0e387a7edcceb422af83b78496b49cd6c9031.dcf) (1.44 KB) Update: tbone has improved the script to work with column names that contain spaces, [here](https://resource.dopus.com/viewtopic.php?p=148368#p148368). I overlooked that, since none of the internal column names use spac…

---

<div class="post-metadata">

### Author: ![MartO](https://resource.dopus.com/user_avatar/resource.dopus.com/marto/32/54727_2.png) [@MartO](https://resource.dopus.com/u/MartO)
#### Post date: [May 23, 2024, 10:21am UTC](https://resource.dopus.com/t/command-for-double-clicking-a-column-divider/50774/13 "2024-05-23T10:21:12Z")

</div>

🎉 And it now works perfectly in [13.6.3](https://resource.dopus.com/t/directory-opus-13-6-3-beta/50902):  
`Set AUTOSIZECOLUMNS=col:name,override`

Thank you very much for your quick and very responsive support!!
