Dialog Designer missing objects

Technical support and scripting issues

Moderators: JRL, Dorian Ellis

Dialog Designer missing objects

Postby obfusc88 » Sat May 12, 2012 7:50 am

Using MS Version 121.10

1. When using the Designer I cannot find how to add radio buttons to the group.
2. When using the Designer I cannot find how to add FileBrowser object.

3. I have found some code examples that allowed to create two buttons that do show up in the Designer, but I cannot modify their properties since I cannot select them as objects.

4. I have found some code examples for File Browser but it appears to be from earlier versions of Dialog Designer.

So, how do I use Dialog Designer to add these objects and modify their properties. I found nothing in the Help guide that provided any info.
obfusc88
Pro Scripter
 
Posts: 72
Joined: Wed Mar 14, 2007 6:22 pm

Postby Marcus Tettmar » Mon May 14, 2012 10:52 am

1. The buttons are represented by a list of items using the Text property. So to add buttons to the group, go to the group's Text property in the properties list, right click and select Multiline Edit and then put the text for each button on a new line.

2. FileBrowse is a method of the Button object. Create an OnClick handler for the button. In the handler's subroutine set the button's DoBrowse property to True, then get it's Filename property. That's it. Here's an example:

Code: Select all
Dialog>Dialog1
object Dialog1: TForm
  Left = -887
  Top = 277
  HelpContext = 5000
  BorderIcons = [biSystemMenu]
  Caption = 'CustomDialog'
  ClientHeight = 212
  ClientWidth = 431
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = True
  ShowHint = True
  OnTaskBar = False
  PixelsPerInch = 96
  TextHeight = 13
  object MSButton1: tMSButton
    Left = 245
    Top = 24
    Width = 75
    Height = 25
    Caption = 'Browse'
    DoubleBuffered = True
    ParentDoubleBuffered = False
    TabOrder = 0
    DoBrowse = False
    BrowseStyle = fbOpen
  end
  object Edit1: TEdit
    Left = 248
    Top = 60
    Width = 161
    Height = 21
    TabOrder = 9
    Text = 'Edit1'
  end
end
EndDialog>Dialog1

AddDialogHandler>Dialog1,MSButton1,OnClick,PerformBrowse

Show>Dialog1,r

SRT>PerformBrowse
  SetDialogProperty>Dialog1,MSButton1,DoBrowse,TRUE
  GetDialogProperty>Dialog1,MSButton1,Filename,theFile
  SetDialogProperty>Dialog1,Edit1,Text,theFile
END>PerformBrowse


Run it, click on the button and the file browse dialog appears, select a file, and the filename appears in the edit box.

3. So don't really understand this one. In design view just click on the button or any object and you'll see the properties list update for the properties belonging to that object.

4. See my example above.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
User avatar
Marcus Tettmar
Site Admin
 
Posts: 5789
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK

Postby obfusc88 » Wed May 16, 2012 6:02 am

Thanks, that worked perfect for the File Browse. Where can I find that information? I could not find it in the Help files.

Is there an option to Browse for the Path vs. the Filename? I guess it is possible to browse to any file in that folder and then parse out the path, but what if there is no file in the desired folder yet?
obfusc88
Pro Scripter
 
Posts: 72
Joined: Wed Mar 14, 2007 6:22 pm

Postby Marcus Tettmar » Wed May 16, 2012 7:22 am

FileBrowse is a property of the Button object, so it is documented in the help file in the Button object topic. Look at BrowseStylen to set it to a folder browse, instead of file browse. Look also at Filter. Use the properties editor to set.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
User avatar
Marcus Tettmar
Site Admin
 
Posts: 5789
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK

Postby obfusc88 » Thu May 17, 2012 3:11 am

Thanks again. I tried the Help section Index on Button with no luck. I tried "object" with no luck. Then I switched from the Index and did a Search for Button Object, and got Button Object Properties.

I was able to change the BrowseStyle on the Button to search for a folder vs. a file, exactly what I was looking for. And I now see that a SaveAs option is also available if I need it.

With that knowledge behind me, I also see all the other Dialog Object Properties Help sections. Working now on Progress Bar, and having the Help section is a bonus. Could not find any of these terms in the Help Index.
obfusc88
Pro Scripter
 
Posts: 72
Joined: Wed Mar 14, 2007 6:22 pm


Return to Technical / Scripting

Who is online

Users browsing this forum: Exabot [Bot] and 5 guests